From e849148fe9cb8ef5621c4a64ac0cecbcc6e0a04b Mon Sep 17 00:00:00 2001 From: nathan Date: Mon, 19 Jun 2006 20:09:03 +0000 Subject: [PATCH] Branch b1_5 b=8007 minor error message improvement --- lustre/utils/mount_lustre.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lustre/utils/mount_lustre.c b/lustre/utils/mount_lustre.c index 85ca11e..cc336e1 100644 --- a/lustre/utils/mount_lustre.c +++ b/lustre/utils/mount_lustre.c @@ -381,7 +381,8 @@ int main(int argc, char *const argv[]) if (errno == ENOTBLK) fprintf(stderr, "Do you need -o loop?\n"); if (errno == ENOMEDIUM) - fprintf(stderr,"This filesystem needs at least 1 OST\n"); + fprintf(stderr, + "This filesystem needs at least 1 OST\n"); if (errno == ENOENT) fprintf(stderr, "Is the MGS specification correct? Is " "the filesystem name correct?\n"); @@ -398,12 +399,14 @@ int main(int argc, char *const argv[]) fprintf(stderr, "The target service's index is already " "in use. (%s)\n", source); if (errno == EINVAL) { - char *ptr = strchr(source, '/'); - fprintf(stderr, "This may have multiple causes.\n" - "Is '%s' the correct filesystem name?\n" - "Are the mount options correct?\n", - ptr ? ptr + 1 : source); - fprintf(stderr, "Check the syslog for more info\n"); + char *ptr = strrchr(source, ':'); + fprintf(stderr, "This may have multiple causes.\n"); + if (ptr && (strlen(ptr) > 2)) + /* client */ + fprintf(stderr, "Is '%s' the correct filesystem" + " name?\n", ptr + 2); + fprintf(stderr, "Are the mount options correct?\n"); + fprintf(stderr, "Check the syslog for more info.\n"); } rc = errno; } else if (!nomtab) { -- 1.8.3.1