summaryrefslogtreecommitdiffstats
path: root/disk-utils
diff options
context:
space:
mode:
authorKarel Zak2007-07-25 16:55:25 +0200
committerKarel Zak2007-07-25 17:18:57 +0200
commitf88c89db4fe96d0de7e889c3d1a6ea770bc3eaa3 (patch)
tree9691cbdf53ed1c38b3939183f24416b8a143ca59 /disk-utils
parentionice: cleanup usage for idle class (diff)
downloadkernel-qcow2-util-linux-f88c89db4fe96d0de7e889c3d1a6ea770bc3eaa3.tar.gz
kernel-qcow2-util-linux-f88c89db4fe96d0de7e889c3d1a6ea770bc3eaa3.tar.xz
kernel-qcow2-util-linux-f88c89db4fe96d0de7e889c3d1a6ea770bc3eaa3.zip
mkswap: fix signedness problems and remove obsolete code
The UUID is unsigned char * Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils')
-rw-r--r--disk-utils/mkswap.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
index fdd3e0d7a..1fd1f185b 100644
--- a/disk-utils/mkswap.c
+++ b/disk-utils/mkswap.c
@@ -195,28 +195,8 @@ write_signature(char *sig) {
strncpy(sp+pagesize-10, sig, 10);
}
-#if 0
-static int
-tohex(int a) {
- return ((a < 10) ? '0'+a : 'a'+a-10);
-}
-
-static void
-uuid_unparse(unsigned char *uuid, char *s) {
- int i;
-
- for (i=0; i<16; i++) {
- if (i == 4 || i == 6 || i == 8 || i == 10)
- *s++ = '-';
- *s++ = tohex((uuid[i] >> 4) & 0xf);
- *s++ = tohex(uuid[i] & 0xf);
- }
- *s = 0;
-}
-#endif
-
static void
-write_uuid_and_label(char *uuid, char *volume_name) {
+write_uuid_and_label(unsigned char *uuid, char *volume_name) {
struct swap_header_v1_2 *h;
/* Sanity check */
@@ -520,7 +500,7 @@ main(int argc, char ** argv) {
char *block_count = 0;
char *pp;
char *opt_label = NULL;
- char *uuid = NULL;
+ unsigned char *uuid = NULL;
#ifdef HAVE_LIBUUID
uuid_t uuid_dat;
#endif