From 2085aef5f5055553fbfb80983657cace7382fe82 Mon Sep 17 00:00:00 2001 From: Alan Brault Date: Sun, 5 Dec 2010 16:42:34 -0500 Subject: Structural Changes --- build.sh | 5 ---- include/netnuke.h | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/Makefile | 16 ------------- src/netnuke.h | 69 ------------------------------------------------------- 4 files changed, 69 insertions(+), 90 deletions(-) delete mode 100755 build.sh create mode 100644 include/netnuke.h delete mode 100644 src/Makefile delete mode 100644 src/netnuke.h diff --git a/build.sh b/build.sh deleted file mode 100755 index 0e49283..0000000 --- a/build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -cd src/ -make -mv netnuke ../ - diff --git a/include/netnuke.h b/include/netnuke.h new file mode 100644 index 0000000..b24af74 --- /dev/null +++ b/include/netnuke.h @@ -0,0 +1,69 @@ +/** + * NetNuke - Erases all storage media detected by the system + * Copyright (C) 2009-2010 Joseph Hunkeler + * + * This file is part of NetNuke. + * + * NetNuke is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * NetNuke is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with NetNuke. If not, see . + **/ + +#ifndef NETNUKE_H +#define NETNUKE_H + +#define AUTHOR "Joseph Hunkeler" +#define LICENSE "GPLv3" +#define VERSION_MAJOR 2 +#define VERSION_MINOR 0 + +#define BUS_SCSI 0x02 +#define BUS_IDE 0x04 +#define BUS_BOTH (BUS_SCSI | BUS_IDE) +#define MAXLINE 512 +#define MAXTHREAD 255 + +#define NNLOGFILE "netnuke.log" +#define self __FUNCTION__ + +#define _FILE_OFFSET_BITS 64 + +typedef struct nndevice_t +{ + char vendor[50]; + char model[50]; + char path[50]; + unsigned int blksz; + unsigned long long blks; + unsigned long long sz; +} nndevice_t; + +void ignore_device(char** list, nndevice_t** d); +int strind(const char* str, const char ch); +int nnlogcleanup(); +int COM(const char* func, char *format, ...); +void* wipe(void* device); +pthread_t nnthread(nndevice_t* device); +int nnwrite(FILE* fp, int bsize); +void nnrandinit(); +void nnrandfree(); +unsigned int nngetseed(); +unsigned int nnrand(int min, int max); +char* randstr(int size); +int scanbus_sysfs(nndevice_t** device); +int scanbus(nndevice_t** device,int mask); +void showbus(int mask); +int selectbus(char** flags); +void usage(const char* progname); + + +#endif //NETNUKE_H diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index 357fe74..0000000 --- a/src/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -CFLAGS=-Wall -O2 -LDFLAGS=-lpthread -objects=netnuke.o nukectl.o bus.o output_redirect.o misc.o - -netnuke: ${objects} - ${CC} ${CFLAGS} ${LDFLAGS} -o netnuke ${objects} - -netnuke.o: netnuke.h -nukectl.o: netnuke.h -bus.o: netnuke.h -output_redirect.o: netnuke.h -misc.o: - -.PHONY: clean -clean: - -rm netnuke ${objects} diff --git a/src/netnuke.h b/src/netnuke.h deleted file mode 100644 index b24af74..0000000 --- a/src/netnuke.h +++ /dev/null @@ -1,69 +0,0 @@ -/** - * NetNuke - Erases all storage media detected by the system - * Copyright (C) 2009-2010 Joseph Hunkeler - * - * This file is part of NetNuke. - * - * NetNuke is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * NetNuke is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with NetNuke. If not, see . - **/ - -#ifndef NETNUKE_H -#define NETNUKE_H - -#define AUTHOR "Joseph Hunkeler" -#define LICENSE "GPLv3" -#define VERSION_MAJOR 2 -#define VERSION_MINOR 0 - -#define BUS_SCSI 0x02 -#define BUS_IDE 0x04 -#define BUS_BOTH (BUS_SCSI | BUS_IDE) -#define MAXLINE 512 -#define MAXTHREAD 255 - -#define NNLOGFILE "netnuke.log" -#define self __FUNCTION__ - -#define _FILE_OFFSET_BITS 64 - -typedef struct nndevice_t -{ - char vendor[50]; - char model[50]; - char path[50]; - unsigned int blksz; - unsigned long long blks; - unsigned long long sz; -} nndevice_t; - -void ignore_device(char** list, nndevice_t** d); -int strind(const char* str, const char ch); -int nnlogcleanup(); -int COM(const char* func, char *format, ...); -void* wipe(void* device); -pthread_t nnthread(nndevice_t* device); -int nnwrite(FILE* fp, int bsize); -void nnrandinit(); -void nnrandfree(); -unsigned int nngetseed(); -unsigned int nnrand(int min, int max); -char* randstr(int size); -int scanbus_sysfs(nndevice_t** device); -int scanbus(nndevice_t** device,int mask); -void showbus(int mask); -int selectbus(char** flags); -void usage(const char* progname); - - -#endif //NETNUKE_H -- cgit