| Summary: | mount: nfs_strerror() broken for EDQUOT on mips | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Jonas Gorski <jonas.gorski+bbbugs> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | trivial | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.16.x | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Host: | Target: | mips | |
| Build: | 1.16.1 | ||
Proposed fix:
#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
};
Fixed in git, thanks! |
Compiling busybox for mips produces a warning on compilation of mount.c that a too long value was truncated. Reason is that: static const uint8_t nfs_err_errnum[] = { EPERM , ENOENT , EIO , ENXIO , EACCES, EEXIST, ENODEV, ENOTDIR , EISDIR , EINVAL, EFBIG , ENOSPC, EROFS , ENAMETOOLONG, ENOTEMPTY, EDQUOT, ESTALE, EREMOTE }; but asm/errno.h for mips has: #define EDQUOT 1133 /* Quota exceeded */ changing nfs_err_errnum to uint16_t should fix this. P.S: MIPS isn't the only architecture with errnums bigger than 255, but the only one with one used here.