From: huanghua Date: Mon, 17 Apr 2006 10:23:47 +0000 (+0000) Subject: mkdir oi & ROOT for iam need. X-Git-Tag: v1_8_0_110~486^2~1972 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2d943dcd773a4f00502febff081562ecf84fa27a;p=fs%2Flustre-release.git mkdir oi & ROOT for iam need. --- diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index a14db82..b00e2ed 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -581,6 +581,26 @@ int write_local_files(struct mkfs_opts *mop) ret = 0; } + sprintf(filepnm, "%s/%s", mntpt, "oi"); + ret = mkdir(filepnm, 0777); + if ((ret != 0) && (errno != EEXIST)) { + fprintf(stderr, "%s: Can't make oi dir %s (%d)\n", + progname, filepnm, ret); + goto out_umnt; + } else if (errno == EEXIST) { + ret = 0; + } + + sprintf(filepnm, "%s/%s", mntpt, "ROOT"); + ret = mkdir(filepnm, 0777); + if ((ret != 0) && (errno != EEXIST)) { + fprintf(stderr, "%s: Can't make ROOT dir %s (%d)\n", + progname, filepnm, ret); + goto out_umnt; + } else if (errno == EEXIST) { + ret = 0; + } + /* Save the persistent mount data into a file. Lustre must pre-read this file to get the real mount options. */ vprint("Writing %s\n", MOUNT_DATA_FILE);