]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
micron: don't ignore 'system()' return value
authorKeith Busch <kbusch@kernel.org>
Fri, 20 Dec 2019 17:15:36 +0000 (02:15 +0900)
committerKeith Busch <kbusch@kernel.org>
Fri, 20 Dec 2019 17:15:36 +0000 (02:15 +0900)
Some compilers will generate warnings that this return value can't be
ignored.

Signed-off-by: Keith Busch <kbusch@kernel.org>
plugins/micron/micron-nvme.c

index ff191571b45d5a7b8d224749a3b58f9d5c7809aa..8240887076d7032e5b2dc95d165dac013cf0531d 100644 (file)
@@ -73,7 +73,7 @@ static int ZipAndRemoveDir(char *strDirName, char *strFileName)
        }
 
  exit_status:
-       (void)system("rm -f temp.txt");
+       err = system("rm -f temp.txt");
        return err;
 }
 
@@ -960,7 +960,8 @@ static void GetOSConfig(const char *strOSDirName)
                }
                strcpy(strTemp, cmdArray[i].strCommand);
                sprintf(strBuffer, strTemp, strFileName);
-               (void)system(strBuffer);
+               if (system(strBuffer))
+                       fprintf(stderr, "Failed to send \"%s\"\n", strBuffer);
        }
 }