Whamcloud - gitweb
LU-2467 utils: Update wirecheck for new connect flags
[fs/lustre-release.git] / lustre / utils / mount_utils.c
index 565ed85..00e5d5c 100644 (file)
@@ -26,7 +26,7 @@
 /*
  * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
- * Copyright (c) 2012 Whamcloud, Inc.
+ * Copyright (c) 2011, 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -37,6 +37,7 @@
 #  include "config.h"
 #endif /* HAVE_CONFIG_H */
 
+#include "mount_utils.h"
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
@@ -45,7 +46,6 @@
 #include <lustre_ver.h>
 #include <sys/stat.h>
 #include <sys/utsname.h>
-#include "mount_utils.h"
 
 extern char *progname;
 extern int verbose;
@@ -339,7 +339,8 @@ int loop_setup(struct mkfs_opts *mop)
                                continue;
                        if (ret) {
                                fprintf(stderr, "%s: error %d on losetup: %s\n",
-                                       progname, ret, strerror(ret));
+                                       progname, ret,
+                                       ret >= 0 ? strerror(ret) : "");
                                return ret;
                        }
                        strscpy(mop->mo_loopdev, l_device,