Diverse Fixes.

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@509 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
ms
2007-04-30 13:25:32 +00:00
parent 129cb39959
commit 1179dc2791
5 changed files with 9 additions and 10 deletions

View File

@@ -13,6 +13,10 @@
#include <fcntl.h>
#include "setuid.h"
#define BUFFER_SIZE 1024
char command[BUFFER_SIZE];
int main(int argc, char *argv[]) {
if (!(initsetuid()))
@@ -22,7 +26,8 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "\nNo argument given.\n\nsmartctrl <device>\n\n");
exit(1);
}
safe_system("smartctl -iHA /dev/%s", argv[1]);
sprintf(command, "smartctl -iHA /dev/%s", argv[1]);
safe_system(command);
return 0;
}