chiark / gitweb /
test-fileio: use random name for written file
[elogind.git] / src / udev / scsi_id / scsi_id.c
index d664787fd9c8846e237fb4563056eae2a04eecd3..ab7c54c3f2ae78a7d9a714186cd8806bb56ce161 100644 (file)
@@ -227,7 +227,7 @@ static int get_file_options(struct udev *udev,
                         continue;
 
                 str1 = strsep(&buf, "=");
-                if (str1 && strcasecmp(str1, "VENDOR") == 0) {
+                if (str1 && strcaseeq(str1, "VENDOR")) {
                         str1 = get_value(&buf);
                         if (!str1) {
                                 retval = log_oom();
@@ -236,7 +236,7 @@ static int get_file_options(struct udev *udev,
                         vendor_in = str1;
 
                         str1 = strsep(&buf, "=");
-                        if (str1 && strcasecmp(str1, "MODEL") == 0) {
+                        if (str1 && strcaseeq(str1, "MODEL")) {
                                 str1 = get_value(&buf);
                                 if (!str1) {
                                         retval = log_oom();
@@ -247,7 +247,7 @@ static int get_file_options(struct udev *udev,
                         }
                 }
 
-                if (str1 && strcasecmp(str1, "OPTIONS") == 0) {
+                if (str1 && strcaseeq(str1, "OPTIONS")) {
                         str1 = get_value(&buf);
                         if (!str1) {
                                 retval = log_oom();
@@ -372,11 +372,11 @@ static int set_options(struct udev *udev,
                         exit(0);
 
                 case 'p':
-                        if (strcmp(optarg, "0x80") == 0) {
+                        if (streq(optarg, "0x80")) {
                                 default_page_code = PAGE_80;
-                        } else if (strcmp(optarg, "0x83") == 0) {
+                        } else if (streq(optarg, "0x83")) {
                                 default_page_code = PAGE_83;
-                        } else if (strcmp(optarg, "pre-spc3-83") == 0) {
+                        } else if (streq(optarg, "pre-spc3-83")) {
                                 default_page_code = PAGE_83_PRE_SPC3;
                         } else {
                                 log_error("Unknown page code '%s'\n", optarg);
@@ -449,11 +449,11 @@ static int per_dev_options(struct udev *udev,
                         break;
 
                 case 'p':
-                        if (strcmp(optarg, "0x80") == 0) {
+                        if (streq(optarg, "0x80")) {
                                 *page_code = PAGE_80;
-                        } else if (strcmp(optarg, "0x83") == 0) {
+                        } else if (streq(optarg, "0x83")) {
                                 *page_code = PAGE_83;
-                        } else if (strcmp(optarg, "pre-spc3-83") == 0) {
+                        } else if (streq(optarg, "pre-spc3-83")) {
                                 *page_code = PAGE_83_PRE_SPC3;
                         } else {
                                 log_error("Unknown page code '%s'\n", optarg);