aboutsummaryrefslogtreecommitdiff
path: root/netnuke.h
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunk@stsci.edu>2009-09-16 23:07:58 -0400
committerJoseph Hunkeler <jhunk@stsci.edu>2009-09-16 23:07:58 -0400
commitfc227dfce34386764a0b717c56ac4a2253e64aa8 (patch)
tree81dad7f7c8661d5404867131ecb7b58b61b3fe0f /netnuke.h
parent2f03b5eb6491d9f210512fd790b7c319c231788d (diff)
downloadNetNuke-fc227dfce34386764a0b717c56ac4a2253e64aa8.tar.gz
Rewrite the entire core of NetNuke to store every media device in an array of structs.
So far the code is solid, but live-testing will be the deciding factor in if that is a true statement. Also, I remember getSize(const char* media) because it is no longer viable to use
Diffstat (limited to 'netnuke.h')
-rw-r--r--netnuke.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/netnuke.h b/netnuke.h
index 1adfee0..a8232d8 100644
--- a/netnuke.h
+++ b/netnuke.h
@@ -4,12 +4,12 @@
/* Prototypes */
void fillRandom(char buffer[], uint64_t length);
void staticPattern() __attribute__((alias("fillRandom")));
-int32_t nuke(char* media, uint64_t size);
uint64_t getSize(const char* media);
void echoList(void);
void usage(const char* cmd);
void version_short();
void version(const char* cmd);
+void cleanup();
#ifndef __FreeBSD__
int humanize_number(char *buf, size_t len, int64_t bytes,
const char *suffix, int scale, int flags);
@@ -54,7 +54,10 @@ int humanize_number(char *buf, size_t len, int64_t bytes,
#define NEEDNUM 4
#define NEEDSTR 8
+#ifndef __FreeBSD__
#define DISK_IDENT_SIZE BUFSIZ
+#endif
+
#define USABLE_MEDIA 0
/* Enumerated lists */
@@ -83,7 +86,8 @@ typedef struct MEDIA_T
char nameshort[10];
char ident[DISK_IDENT_SIZE];
} media_t;
-media_t *buildMediaList();
+int32_t nuke(media_t device);
+void buildMediaList(media_t devices[]);
media_t getMediaInfo(const char* media);