]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix up warnings being reported by mkfs when running QA with an external log on a...
authorNathan Scott <nathans@sgi.com>
Tue, 8 Aug 2006 15:34:23 +0000 (15:34 +0000)
committerNathan Scott <nathans@sgi.com>
Tue, 8 Aug 2006 15:34:23 +0000 (15:34 +0000)
Merge of master-melb:xfs-cmds:26731a by kenmcd.

libxfs/darwin.c
libxfs/freebsd.c
libxfs/init.c
libxfs/init.h
libxfs/irix.c
libxfs/linux.c

index 59e47927174125a957ec2b9877e14bb42fd0739c..cb538d982cc58332db0d8bb99c1918784200906a 100644 (file)
@@ -52,7 +52,7 @@ platform_check_iswritable(char *name, char *block, struct stat64 *s, int fatal)
 }
 
 void
-platform_set_blocksize(int fd, char *path, int blocksize)
+platform_set_blocksize(int fd, char *path, dev_t device, int blocksize)
 {
 }
 
index a179fa8a6c547efe8e3dc7827404dedc9bceca60..441cb0ae9654ff2c82b5ed0161db228130379815 100644 (file)
@@ -92,7 +92,7 @@ platform_check_iswritable(char *name, char *block, struct stat64 *s, int fatal)
 }
 
 void
-platform_set_blocksize(int fd, char *path, int blocksize)
+platform_set_blocksize(int fd, char *path, dev_t device, int blocksize)
 {
        return;
 }
index 21d040abad4f651bf0dcd14f531edeb469e1873e..7e3bb72546cede048237a999a1e1d6b1308341be 100644 (file)
@@ -116,9 +116,8 @@ retry:
                exit(1);
        }
 
-       if (!readonly && setblksize && (statb.st_mode & S_IFMT) == S_IFBLK) {
-               platform_set_blocksize(fd, path, 512);
-       }
+       if (!readonly && setblksize && (statb.st_mode & S_IFMT) == S_IFBLK)
+               platform_set_blocksize(fd, path, statb.st_rdev, 512);
 
        /*
         * Get the device number from the stat buf - unless
index 60e89902c4310518a318a83fdfa3981f431cd562..38d90b90120ba43211463f287aa73bfefb3bfb88 100644 (file)
@@ -25,7 +25,7 @@ extern int platform_check_ismounted (char *path, char *block,
 extern int platform_check_iswritable (char *path, char *block,
                                        struct stat64 *sptr, int fatal);
 extern void platform_findsizes (char *path, int fd, long long *sz, int *bsz);
-extern void platform_set_blocksize (int fd, char *path, int blocksize);
+extern void platform_set_blocksize (int fd, char *path, dev_t device, int bsz);
 extern void platform_flush_device (int fd, dev_t device);
 extern char *platform_findrawpath(char *path);
 extern char *platform_findrawpath (char *path);
index b0f637aacd0819f9d9f7636116676669c1cb0c5d..9869f77cb2024b68ceb46e88abb77cd4947c4882 100644 (file)
@@ -36,7 +36,7 @@ platform_check_iswritable(char *name, char *block, struct stat64 *s, int fatal)
 }
 
 void
-platform_set_blocksize(int fd, char *path, int blocksize)
+platform_set_blocksize(int fd, char *path, dev_t device, int blocksize)
 {
        return;
 }
index f2d975c4395b3d4e2444ecf508dbafaafac4f7b9..08befd1a388bd081995e239f7c859f5c6c9f8592 100644 (file)
@@ -103,12 +103,14 @@ platform_check_iswritable(char *name, char *block, struct stat64 *s, int fatal)
 }
 
 void
-platform_set_blocksize(int fd, char *path, int blocksize)
+platform_set_blocksize(int fd, char *path, dev_t device, int blocksize)
 {
-       if (ioctl(fd, BLKBSZSET, &blocksize) < 0) {
-               fprintf(stderr, _("%s: warning - cannot set blocksize "
-                               "on block device %s: %s\n"),
-                       progname, path, strerror(errno));
+       if (major(device) != RAMDISK_MAJOR) {
+               if (ioctl(fd, BLKBSZSET, &blocksize) < 0) {
+                       fprintf(stderr, _("%s: warning - cannot set blocksize "
+                                       "on block device %s: %s\n"),
+                               progname, path, strerror(errno));
+               }
        }
 }
 
@@ -202,12 +204,6 @@ int
 platform_align_blockdev(void)
 {
        if (!max_block_alignment)
-               abort();
+               return getpagesize();
        return max_block_alignment;
 }
-
-size_t
-platform_memalignment(void)
-{
-       return getpagesize();
-}