mount: handle EDQUOT > 255 properly. closes bug 1579
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 19 May 2010 15:01:29 +0000 (17:01 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 19 May 2010 15:01:29 +0000 (17:01 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/mount.c

index 8ec3071b19f2e2bc962a51c4187d0cb5f2759598..aed6f798bdd6da1a680b642ed0a1744167c010a5 100644 (file)
@@ -749,7 +749,15 @@ static const uint8_t nfs_err_stat[] = {
        19, 20, 21, 22, 27, 28,
        30, 63, 66, 69, 70, 71
 };
-static const uint8_t nfs_err_errnum[] = {
+#if ( \
+       EPERM | ENOENT      | EIO      | ENXIO | EACCES| EEXIST | \
+       ENODEV| ENOTDIR     | EISDIR   | EINVAL| EFBIG | ENOSPC | \
+       EROFS | ENAMETOOLONG| ENOTEMPTY| EDQUOT| ESTALE| EREMOTE) < 256
+typedef uint8_t nfs_err_type;
+#else
+typedef uint16_t nfs_err_type;
+#endif
+static const nfs_err_type nfs_err_errnum[] = {
        EPERM , ENOENT      , EIO      , ENXIO , EACCES, EEXIST,
        ENODEV, ENOTDIR     , EISDIR   , EINVAL, EFBIG , ENOSPC,
        EROFS , ENAMETOOLONG, ENOTEMPTY, EDQUOT, ESTALE, EREMOTE