ifeq "$(LFS_PASS)" "install"
cd $(DIR_APP) && ./configure --prefix=""
cd $(DIR_APP)/src && patch < $(DIR_SRC)/src/patches/slang-$(VER)-uclibc.patch
- cd $(DIR_APP)/src && make $(MAKETUNING)
+ cd $(DIR_APP)/src && make
cd $(DIR_APP)/src && make install DESTDIR="/opt/$(MACHINE)-uClibc"
else
cd $(DIR_APP) && ./configure --prefix=/usr --sysconfdir=/etc
cd $(DIR_APP) && make $(MAKETUNING)
- cd $(DIR_APP) && make elf $(MAKETUNING)
+ cd $(DIR_APP) && make elf
cd $(DIR_APP) && make install-elf
cd $(DIR_APP) && chmod -v 755 /usr/lib/libslang.so.2.0.6
endif
#include <fcntl.h>
#include "setuid.h"
+#define BUFFER_SIZE 1024
+
+char command[BUFFER_SIZE];
+
int main(int argc, char *argv[]) {
if (!(initsetuid()))
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;
}