diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2002-07-08 08:42:56 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2002-07-08 08:42:56 +0000 |
commit | 36f08125f1a685fa61ce12f3e2adfa7ee5712d7d (patch) | |
tree | 11c5782a63a080100da07454567d2d22e9bd61f2 /mdk-stage1 | |
parent | 2f7c6a009bf46df500cd342f0a6b59822be2fae4 (diff) | |
download | drakx-backup-do-not-use-36f08125f1a685fa61ce12f3e2adfa7ee5712d7d.tar drakx-backup-do-not-use-36f08125f1a685fa61ce12f3e2adfa7ee5712d7d.tar.gz drakx-backup-do-not-use-36f08125f1a685fa61ce12f3e2adfa7ee5712d7d.tar.bz2 drakx-backup-do-not-use-36f08125f1a685fa61ce12f3e2adfa7ee5712d7d.tar.xz drakx-backup-do-not-use-36f08125f1a685fa61ce12f3e2adfa7ee5712d7d.zip |
small readability & size enhancement
Diffstat (limited to 'mdk-stage1')
-rw-r--r-- | mdk-stage1/mount.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mdk-stage1/mount.c b/mdk-stage1/mount.c index 917100479..fd86a13b7 100644 --- a/mdk-stage1/mount.c +++ b/mdk-stage1/mount.c @@ -47,7 +47,7 @@ int ensure_dev_exists(char *dev) if (!stat(dev, &buf)) return 0; /* if the file already exists, we assume it's correct */ - if (name[0] == 's' && name[1] == 'd') { + if (ptr_begins_static_str(name, "sd")) { /* SCSI disks */ major = 8; minor = (name[2] - 'a') << 4; @@ -55,7 +55,7 @@ int ensure_dev_exists(char *dev) minor += 10 + (name[4] - '0'); else if (name[3]) minor += (name[3] - '0'); - } else if (name[0] == 'h' && name[1] == 'd') { + } else if (ptr_begins_static_str(name, "hd")) { /* IDE disks/cd's */ if (name[2] == 'a') major = 3, minor = 0; @@ -80,7 +80,7 @@ int ensure_dev_exists(char *dev) minor += 10 + (name[4] - '0'); else if (name[3]) minor += (name[3] - '0'); - } else if (name[0] == 's' && name[1] == 'r') { + } else if (ptr_begins_static_str(name , "sr")) { /* SCSI cd's */ major = 11; minor = name[2] - '0'; |