swapon: reinstate hole check but reduce it to warning
authorDenis Vlasenko <vda.linux@googlemail.com>
Wed, 14 Mar 2007 22:55:39 +0000 (22:55 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Wed, 14 Mar 2007 22:55:39 +0000 (22:55 -0000)
inode_hash: remove unused variable

libbb/inode_hash.c
util-linux/swaponoff.c

index 55a7564cecad00b97ef3ca00c834c8b48efd94b2..0705102b8c484ff69a162de23e1bfc3c8a607cf8 100644 (file)
@@ -53,7 +53,6 @@ char *is_in_ino_dev_hashtable(const struct stat *statbuf)
 void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name)
 {
        int i;
-       size_t s;
        ino_dev_hashtable_bucket_t *bucket;
 
        i = hash_inode(statbuf->st_ino);
index 3a6afe29e689f4316c67fc0873284429190cdca2..893003549c66dd1f73f349b798e7a55d3577f7bc 100644 (file)
@@ -18,11 +18,11 @@ static int swap_enable_disable(char *device)
 
        xstat(device, &st);
 
-#ifdef BLOAT
+#if ENABLE_DESKTOP
        /* test for holes */
        if (S_ISREG(st.st_mode))
                if (st.st_blocks * 512 < st.st_size)
-                       bb_error_msg_and_die("swap file has holes");
+                       bb_error_msg("warning: swap file has holes");
 #endif
 
        if (applet_name[5] == 'n')