11 #include <lustre/lustreapi.h>
13 int main(int argc, char **argv)
15 char *dir = "foreign_dir", *end;
16 char *xval = "UUID@UUID";
18 __u32 type = LU_FOREIGN_TYPE_DAOS, flags = 0;
21 while ((c = getopt(argc, argv, "hd:f:m:t:x:")) != -1) {
30 mode = strtoul(optarg, &end, 8);
33 "%s: invalid mode '%s'\n", argv[0],
39 flags = strtoul(optarg, &end, 0);
42 "%s: invalid flags '%s'\n", argv[0],
48 type = strtoul(optarg, &end, 0);
51 "%s: invalid type '%s'\n", argv[0],
59 "Usage: %s [-d <dirname>] [-m <octalmode>] [-x <LOV EA content>] [-t <type>] [-f <hexflags>]\n",
66 rc = llapi_dir_create_foreign(dir, mode, type, flags, xval);
68 fprintf(stderr, "llapi_dir_create_foreign() error : %d\n", rc);