X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fnfs%2F_info;fp=ccan%2Fnfs%2F_info;h=fa77010bfdcd2d27ea1f131ef3da6d4e9696d3ec;hb=42f0d95f79096702efbd79d8c422328078752302;hp=0000000000000000000000000000000000000000;hpb=85c347709c1740af23dde53685475e5d8118125e;p=ccan diff --git a/ccan/nfs/_info b/ccan/nfs/_info new file mode 100644 index 00000000..fa77010b --- /dev/null +++ b/ccan/nfs/_info @@ -0,0 +1,58 @@ +#include +#include + +/** + * nfs - nfs client library + * + * This code offers a POSIX-like interface directly to an NFS server. + * + * Note: various files are generated from the XDR descriptions in the rpc/ + * directory using rpcgen. + * + * Example: + * #include + * #include + * #include + * #include + * #include + * #include + * + * int main(int argc, char *argv[]) + * { + * struct nfs_context *nfs; + * struct stat st; + * + * if (argc != 4) + * errx(1, "Usage: %s ", argv[0]); + * nfs = nfs_init_context(); + * if (!nfs) + * err(1, "Initializing nfs context"); + * + * if (nfs_mount_sync(nfs, argv[1], argv[2]) != 0) + * errx(1, "Failed to mount nfs share: %s", nfs_get_error(nfs)); + * + * if (nfs_stat_sync(nfs, argv[3], &st) != 0) + * errx(1, "Failed to stat(%s): %s", argv[3], nfs_get_error(nfs)); + * + * printf("Mode %04o\n", st.st_mode); + * printf("Size %u\n", (int)st.st_size); + * printf("Inode %u\n", (int)st.st_ino); + * + * nfs_destroy_context(nfs); + * printf("nfsclient finished\n"); + * return 0; + *} + */ +int main(int argc, char *argv[]) +{ + /* Expect exactly one argument */ + if (argc != 2) + return 1; + + if (strcmp(argv[1], "depends") == 0) { + printf("ccan/compiler\n"); + return 0; + } + + return 1; +}