diff options
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r-- | util-linux/mount.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index fbc89c862..cb40c802d 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -641,7 +641,7 @@ static llist_t *get_block_backed_filesystems(void) | |||
641 | if (!f) continue; | 641 | if (!f) continue; |
642 | 642 | ||
643 | while ((buf = xmalloc_fgetline(f)) != NULL) { | 643 | while ((buf = xmalloc_fgetline(f)) != NULL) { |
644 | if (strncmp(buf, "nodev", 5) == 0 && isspace(buf[5])) | 644 | if (is_prefixed_with(buf, "nodev") && isspace(buf[5])) |
645 | goto next; | 645 | goto next; |
646 | fs = skip_whitespace(buf); | 646 | fs = skip_whitespace(buf); |
647 | if (*fs == '#' || *fs == '*' || !*fs) | 647 | if (*fs == '#' || *fs == '*' || !*fs) |
@@ -1364,9 +1364,9 @@ static NOINLINE int nfsmount(struct mntent *mp, unsigned long vfsflags, char *fi | |||
1364 | strcspn(opteq, " \t\n\r,")); | 1364 | strcspn(opteq, " \t\n\r,")); |
1365 | continue; | 1365 | continue; |
1366 | case 18: // "proto" | 1366 | case 18: // "proto" |
1367 | if (!strncmp(opteq, "tcp", 3)) | 1367 | if (is_prefixed_with(opteq, "tcp")) |
1368 | tcp = 1; | 1368 | tcp = 1; |
1369 | else if (!strncmp(opteq, "udp", 3)) | 1369 | else if (is_prefixed_with(opteq, "udp")) |
1370 | tcp = 0; | 1370 | tcp = 0; |
1371 | else | 1371 | else |
1372 | bb_error_msg("warning: unrecognized proto= option"); | 1372 | bb_error_msg("warning: unrecognized proto= option"); |
@@ -1459,7 +1459,7 @@ static NOINLINE int nfsmount(struct mntent *mp, unsigned long vfsflags, char *fi | |||
1459 | "rdirplus\0" | 1459 | "rdirplus\0" |
1460 | "acl\0"; | 1460 | "acl\0"; |
1461 | int val = 1; | 1461 | int val = 1; |
1462 | if (!strncmp(opt, "no", 2)) { | 1462 | if (is_prefixed_with(opt, "no")) { |
1463 | val = 0; | 1463 | val = 0; |
1464 | opt += 2; | 1464 | opt += 2; |
1465 | } | 1465 | } |
@@ -1979,7 +1979,7 @@ static int singlemount(struct mntent *mp, int ignore_busy) | |||
1979 | } | 1979 | } |
1980 | 1980 | ||
1981 | // Might this be an NFS filesystem? | 1981 | // Might this be an NFS filesystem? |
1982 | if ((!mp->mnt_type || strncmp(mp->mnt_type, "nfs", 3) == 0) | 1982 | if ((!mp->mnt_type || is_prefixed_with(mp->mnt_type, "nfs")) |
1983 | && strchr(mp->mnt_fsname, ':') != NULL | 1983 | && strchr(mp->mnt_fsname, ':') != NULL |
1984 | ) { | 1984 | ) { |
1985 | if (!mp->mnt_type) | 1985 | if (!mp->mnt_type) |