All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] minix: v3 super-block does not have s_state field
@ 2011-07-12 15:50 Sami Kerola
  2011-07-13  4:05 ` Davidlohr Bueso
  0 siblings, 1 reply; 12+ messages in thread
From: Sami Kerola @ 2011-07-12 15:50 UTC (permalink / raw)
  To: util-linux; +Cc: kerolasa

Originally attempt was to use minix definitions and file system
structures from linux/minix_fs.h, but that failed at first try.

mkfs.minix.c:164:10: error: no member named 's_state' in 'struct
      minix3_super_block'
                Super3.s_state |= MINIX_VALID_FS;
                ~~~~~~ ^
mkfs.minix.c:165:10: error: no member named 's_state' in 'struct
      minix3_super_block'
                Super3.s_state &= ~MINIX_ERROR_FS;

Primary reason seems to be that the minix3 super-block does not
have s_state field. And it looks to me that it has never had it.
Further details about s_state can be found from minix v3 file
system support kernel patch.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=939b00df0306bc4b5cd25c3c3c78e89b91e72fc8

Former minix disk s_state is now in kernel memory super-block
info structure as a s_mount_state field, if someone wonders what
happen to it.

Issue appeared commit a2657ae3ffb56616ac9c921886bcca8ef242499f
(13 days ago), and hopefully not too many users where affected as
I am not sure how bad it is to have mismatch in super-block
structure.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 disk-utils/minix.h      |   68 +----------------------------------------------
 disk-utils/mkfs.minix.c |    2 -
 2 files changed, 1 insertions(+), 69 deletions(-)

diff --git a/disk-utils/minix.h b/disk-utils/minix.h
index fc1d1c0..de79366 100644
--- a/disk-utils/minix.h
+++ b/disk-utils/minix.h
@@ -1,90 +1,24 @@
 #ifndef __MINIX_H__
 #define __MINIX_H__
 
-#ifdef KERNEL_INCLUDES_ARE_CLEAN
-
+#include <linux/types.h>
 #include <linux/fs.h>
 #include <linux/minix_fs.h>
 
-#else
-
-typedef unsigned char u8;
-typedef unsigned short u16;
-typedef unsigned int u32;
-
-struct minix_inode {
-        u16 i_mode;
-        u16 i_uid;
-        u32 i_size;
-        u32 i_time;
-        u8  i_gid;
-        u8  i_nlinks;
-        u16 i_zone[9];
-};
-
-struct minix2_inode {
-        u16 i_mode;
-        u16 i_nlinks;
-        u16 i_uid;
-        u16 i_gid;
-        u32 i_size;
-        u32 i_atime;
-        u32 i_mtime;
-        u32 i_ctime;
-        u32 i_zone[10];
-};
-
-struct minix_super_block {
-        u16 s_ninodes;
-        u16 s_nzones;
-        u16 s_imap_blocks;
-        u16 s_zmap_blocks;
-        u16 s_firstdatazone;
-        u16 s_log_zone_size;
-        u32 s_max_size;
-        u16 s_magic;
-        u16 s_state;
-        u32 s_zones;
-};
-
-/* V3 minix super-block data on disk */
-struct minix3_super_block {
-	u32 s_ninodes;
-	u16 s_pad0;
-	u16 s_imap_blocks;
-	u16 s_zmap_blocks;
-	u16 s_firstdatazone;
-	u16 s_log_zone_size;
-	u16 s_pad1;
-	u32 s_max_size;
-	u32 s_zones;
-	u16 s_magic;
-	u16 s_pad2;
-	u16 s_blocksize;
-	u8  s_disk_version;
-        u16 s_state;
-};
-
 #define BLOCK_SIZE_BITS 10
 #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
 
 #define NAME_MAX   255   /* # chars in a file name */
 #define MAX_INODES 65535
 
-#define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode)))
 #define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode)))
 
-#define MINIX_VALID_FS               0x0001          /* Clean fs. */
-#define MINIX_ERROR_FS               0x0002          /* fs has errors. */
-
 #define MINIX_SUPER_MAGIC    0x137F          /* original minix fs */
 #define MINIX_SUPER_MAGIC2   0x138F          /* minix fs, 30 char names */
 #define MINIX2_SUPER_MAGIC   0x2468	     /* minix V2 fs */
 #define MINIX2_SUPER_MAGIC2  0x2478	     /* minix V2 fs, 30 char names */
 #define MINIX3_SUPER_MAGIC   0x4d5a          /* minix V3 fs (60 char names) */
 
-#endif /* KERNEL_INCLUDES_ARE_CLEAN */
-
 #define Inode (((struct minix_inode *) inode_buffer)-1)
 #define Inode2 (((struct minix2_inode *) inode_buffer)-1)
 
diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c
index 916dd17..322c023 100644
--- a/disk-utils/mkfs.minix.c
+++ b/disk-utils/mkfs.minix.c
@@ -161,8 +161,6 @@ static void super_set_state(void)
 {
 	switch (fs_version) {
 	case 3:
-		Super3.s_state |= MINIX_VALID_FS;
-		Super3.s_state &= ~MINIX_ERROR_FS;
 		break;
 	default:
 		Super.s_state |= MINIX_VALID_FS;
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] minix: v3 super-block does not have s_state field
  2011-07-12 15:50 [PATCH] minix: v3 super-block does not have s_state field Sami Kerola
@ 2011-07-13  4:05 ` Davidlohr Bueso
  2011-07-13 11:33   ` Sami Kerola
  0 siblings, 1 reply; 12+ messages in thread
From: Davidlohr Bueso @ 2011-07-13  4:05 UTC (permalink / raw)
  To: Sami Kerola; +Cc: util-linux

On Tue, 2011-07-12 at 17:50 +0200, Sami Kerola wrote:
> Originally attempt was to use minix definitions and file system
> structures from linux/minix_fs.h, but that failed at first try.
> 
> mkfs.minix.c:164:10: error: no member named 's_state' in 'struct
>       minix3_super_block'
>                 Super3.s_state |= MINIX_VALID_FS;
>                 ~~~~~~ ^
> mkfs.minix.c:165:10: error: no member named 's_state' in 'struct
>       minix3_super_block'
>                 Super3.s_state &= ~MINIX_ERROR_FS;
> 
> Primary reason seems to be that the minix3 super-block does not
> have s_state field. And it looks to me that it has never had it.
> Further details about s_state can be found from minix v3 file
> system support kernel patch.

Yes, you are right. It was dropped during time for v3, but previous
versions still use it.

> 
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=939b00df0306bc4b5cd25c3c3c78e89b91e72fc8
> 
> Former minix disk s_state is now in kernel memory super-block
> info structure as a s_mount_state field, if someone wonders what
> happen to it.

I don't think we should always rely on having the kernel headers, that's
why the fallback is provided.

> 
> Issue appeared commit a2657ae3ffb56616ac9c921886bcca8ef242499f
> (13 days ago), and hopefully not too many users where affected as
> I am not sure how bad it is to have mismatch in super-block
> structure.

It can be quite bad depending on the mismatch, in this case the kernel
skips the s_state when using v3.

I think with this patch we address the issue without removing our
fallback.

From: Davidlohr Bueso <dave@gnu.org>
Date: Tue, 12 Jul 2011 23:55:14 -0400
Subject: [PATCH] minix: remove fs state

For v3 minix superblocks the state flag (s_state) has been removed, so drop it from the structure in accordance with the kernel's representation.

Reported-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
 disk-utils/minix.h      |    1 -
 disk-utils/mkfs.minix.c |    7 ++-----
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/disk-utils/minix.h b/disk-utils/minix.h
index fc1d1c0..a13a2a4 100644
--- a/disk-utils/minix.h
+++ b/disk-utils/minix.h
@@ -62,7 +62,6 @@ struct minix3_super_block {
 	u16 s_pad2;
 	u16 s_blocksize;
 	u8  s_disk_version;
-        u16 s_state;
 };
 
 #define BLOCK_SIZE_BITS 10
diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c
index 916dd17..06d087e 100644
--- a/disk-utils/mkfs.minix.c
+++ b/disk-utils/mkfs.minix.c
@@ -160,11 +160,8 @@ static void check_mount(void) {
 static void super_set_state(void)
 {
 	switch (fs_version) {
-	case 3:
-		Super3.s_state |= MINIX_VALID_FS;
-		Super3.s_state &= ~MINIX_ERROR_FS;
-		break;
-	default:
+	case 1:
+	case 2:
 		Super.s_state |= MINIX_VALID_FS;
 		Super.s_state &= ~MINIX_ERROR_FS;
 		break;
-- 
1.7.4.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] minix: v3 super-block does not have s_state field
  2011-07-13  4:05 ` Davidlohr Bueso
@ 2011-07-13 11:33   ` Sami Kerola
  2011-07-13 12:12     ` Karel Zak
  0 siblings, 1 reply; 12+ messages in thread
From: Sami Kerola @ 2011-07-13 11:33 UTC (permalink / raw)
  To: dave; +Cc: util-linux

[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]

On Wed, Jul 13, 2011 at 06:05, Davidlohr Bueso <dave@gnu.org> wrote:
> I don't think we should always rely on having the kernel headers, that's
> why the fallback is provided.
[snip]
> I think with this patch we address the issue without removing our
> fallback.

Hi Dave et.al.

The preprocessor directive bellow is problematic. I don't see where,
or how, it might get satisfied so I am afraid the 'fall back' is
always in use regardless whether an user has kernel headers or not.

#ifdef KERNEL_INCLUDES_ARE_CLEAN

To fix that I modified the patch to use autoconf to check whether each
necessary header is present, and use them if possible. Notice that
Dave that I wrote your name to Reviewed-by patch line so it would be
nice to hear that you're OK with the change. See the attachment, or
pull from my repository.

The following changes since commit bfa8d39b5826b928deb6d84aee3a4a1d6557364c:

  build-sys: fix spaces versus tabs conflict (2011-07-11 15:12:06 +0200)

are available in the git repository at:
  https://github.com/kerolasa/lelux-utiliteetit minix

Sami Kerola (1):
      minix: v3 super-block does not have s_state field

 configure.ac            |    5 ++
 disk-utils/minix.h      |  129 ++++++++++++++++++++++++++++------------------
 disk-utils/mkfs.minix.c |    2 -
 3 files changed, 83 insertions(+), 53 deletions(-)

-- 
   Sami Kerola
   http://www.iki.fi/kerolasa/

[-- Attachment #2: 0001-minix-v3-super-block-does-not-have-s_state-field.txt --]
[-- Type: text/plain, Size: 6807 bytes --]

From 3e60f8617e349aea3a1d3e70e89695dc7c8afda9 Mon Sep 17 00:00:00 2001
From: Sami Kerola <kerolasa@iki.fi>
Date: Tue, 12 Jul 2011 16:45:10 +0200
Subject: [PATCH] minix: v3 super-block does not have s_state field

Originally attempt was to use minix definitions and file system
structures from linux/minix_fs.h, but that failed at first try.

mkfs.minix.c:164:10: error: no member named 's_state' in 'struct
      minix3_super_block'
                Super3.s_state |= MINIX_VALID_FS;
                ~~~~~~ ^
mkfs.minix.c:165:10: error: no member named 's_state' in 'struct
      minix3_super_block'
                Super3.s_state &= ~MINIX_ERROR_FS;

Primary reason seems to be that the minix3 super-block does not
have s_state field. And it looks to me that it has never had it.
Further details about s_state can be found from minix v3 file
system support kernel patch.

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=939b00df0306bc4b5cd25c3c3c78e89b91e72fc8

Former minix disk s_state is now in kernel memory super-block
info structure as a s_mount_state field, if someone wonders what
happen to it.

Issue appeared commit a2657ae3ffb56616ac9c921886bcca8ef242499f
(two weeks ago), and hopefully not too many users where affected.
The mismatch in this case is not completely fatal because it is
at the end of the structure.

The patch fixes also #ifdef KERNEL_INCLUDES_ARE_CLEAN
preprocessor directive, which never is set. Autoconf is set to
inspect that necessary kernel headers are present. For fallback
there are local definitions.

Reviewed-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
---
 configure.ac            |    5 ++
 disk-utils/minix.h      |  129 ++++++++++++++++++++++++++++------------------
 disk-utils/mkfs.minix.c |    2 -
 3 files changed, 83 insertions(+), 53 deletions(-)

diff --git a/configure.ac b/configure.ac
index a02b5e3..c2c74f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,6 +123,11 @@ AC_CHECK_HEADERS(
 	linux/version.h \
 	linux/falloc.h \
 	linux/cdrom.h \
+	linux/fs.h \
+	linux/limits.h \
+	linux/magic.h \
+	linux/minix_fs.h \
+	linux/types.h \
 	fcntl.h \
 	locale.h \
 	stdint.h \
diff --git a/disk-utils/minix.h b/disk-utils/minix.h
index fc1d1c0..6b2ee10 100644
--- a/disk-utils/minix.h
+++ b/disk-utils/minix.h
@@ -1,53 +1,92 @@
 #ifndef __MINIX_H__
 #define __MINIX_H__
 
-#ifdef KERNEL_INCLUDES_ARE_CLEAN
-
-#include <linux/fs.h>
-#include <linux/minix_fs.h>
-
+#ifdef HAVE_LINUX_TYPES_H
+#include <linux/types.h>
 #else
-
 typedef unsigned char u8;
 typedef unsigned short u16;
 typedef unsigned int u32;
+#endif
+
+#ifdef HAVE_LINUX_LIMITS_H
+#include <linux/limits.h>
+#else
+#define NAME_MAX  255		/* # chars in a file name */
+#endif
+
+#ifdef HAVE_LINUX_FS_H
+#include <linux/fs.h>
+#else
+#define BLOCK_SIZE_BITS 10
+#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
+#endif
+
+#ifdef HAVE_LINUX_MAGIC_H
+#include <linux/magic.h>
+#else
+#define MINIX_SUPER_MAGIC	0x137F	/* minix v1 fs, 14 char names */
+#define MINIX_SUPER_MAGIC2	0x138F	/* minix v1 fs, 30 char names */
+#define MINIX2_SUPER_MAGIC	0x2468	/* minix v2 fs, 14 char names */
+#define MINIX2_SUPER_MAGIC2	0x2478	/* minix v2 fs, 30 char names */
+#define MINIX3_SUPER_MAGIC	0x4d5a	/* minix v3 fs, 60 char names */
+#endif
+
+#ifdef HAVE_LINUX_MINIX_FS_H
+#include <linux/minix_fs.h>
+#else
 
+/*
+ * This is the original minix inode layout on disk.
+ * Note the 8-bit gid and atime and ctime.
+ */
 struct minix_inode {
-        u16 i_mode;
-        u16 i_uid;
-        u32 i_size;
-        u32 i_time;
-        u8  i_gid;
-        u8  i_nlinks;
-        u16 i_zone[9];
+	u16 i_mode;
+	u16 i_uid;
+	u32 i_size;
+	u32 i_time;
+	u8 i_gid;
+	u8 i_nlinks;
+	u16 i_zone[9];
 };
 
+/*
+ * The new minix inode has all the time entries, as well as
+ * long block numbers and a third indirect block (7+1+1+1
+ * instead of 7+1+1). Also, some previously 8-bit values are
+ * now 16-bit. The inode is now 64 bytes instead of 32.
+ */
 struct minix2_inode {
-        u16 i_mode;
-        u16 i_nlinks;
-        u16 i_uid;
-        u16 i_gid;
-        u32 i_size;
-        u32 i_atime;
-        u32 i_mtime;
-        u32 i_ctime;
-        u32 i_zone[10];
+	u16 i_mode;
+	u16 i_nlinks;
+	u16 i_uid;
+	u16 i_gid;
+	u32 i_size;
+	u32 i_atime;
+	u32 i_mtime;
+	u32 i_ctime;
+	u32 i_zone[10];
 };
 
+/*
+ * minix super-block data on disk
+ */
 struct minix_super_block {
-        u16 s_ninodes;
-        u16 s_nzones;
-        u16 s_imap_blocks;
-        u16 s_zmap_blocks;
-        u16 s_firstdatazone;
-        u16 s_log_zone_size;
-        u32 s_max_size;
-        u16 s_magic;
-        u16 s_state;
-        u32 s_zones;
+	u16 s_ninodes;
+	u16 s_nzones;
+	u16 s_imap_blocks;
+	u16 s_zmap_blocks;
+	u16 s_firstdatazone;
+	u16 s_log_zone_size;
+	u32 s_max_size;
+	u16 s_magic;
+	u16 s_state;
+	u32 s_zones;
 };
 
-/* V3 minix super-block data on disk */
+/*
+ * V3 minix super-block data on disk
+ */
 struct minix3_super_block {
 	u32 s_ninodes;
 	u16 s_pad0;
@@ -61,29 +100,17 @@ struct minix3_super_block {
 	u16 s_magic;
 	u16 s_pad2;
 	u16 s_blocksize;
-	u8  s_disk_version;
-        u16 s_state;
+	u8 s_disk_version;
 };
 
-#define BLOCK_SIZE_BITS 10
-#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
-
-#define NAME_MAX   255   /* # chars in a file name */
-#define MAX_INODES 65535
-
 #define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode)))
-#define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode)))
-
-#define MINIX_VALID_FS               0x0001          /* Clean fs. */
-#define MINIX_ERROR_FS               0x0002          /* fs has errors. */
+#define MINIX_VALID_FS		0x0001	/* Clean fs. */
+#define MINIX_ERROR_FS		0x0002	/* fs has errors. */
 
-#define MINIX_SUPER_MAGIC    0x137F          /* original minix fs */
-#define MINIX_SUPER_MAGIC2   0x138F          /* minix fs, 30 char names */
-#define MINIX2_SUPER_MAGIC   0x2468	     /* minix V2 fs */
-#define MINIX2_SUPER_MAGIC2  0x2478	     /* minix V2 fs, 30 char names */
-#define MINIX3_SUPER_MAGIC   0x4d5a          /* minix V3 fs (60 char names) */
+#endif				/* HAVE_LINUX_MINIX_FS_H */
 
-#endif /* KERNEL_INCLUDES_ARE_CLEAN */
+#define MAX_INODES 65535
+#define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode)))
 
 #define Inode (((struct minix_inode *) inode_buffer)-1)
 #define Inode2 (((struct minix2_inode *) inode_buffer)-1)
diff --git a/disk-utils/mkfs.minix.c b/disk-utils/mkfs.minix.c
index 916dd17..322c023 100644
--- a/disk-utils/mkfs.minix.c
+++ b/disk-utils/mkfs.minix.c
@@ -161,8 +161,6 @@ static void super_set_state(void)
 {
 	switch (fs_version) {
 	case 3:
-		Super3.s_state |= MINIX_VALID_FS;
-		Super3.s_state &= ~MINIX_ERROR_FS;
 		break;
 	default:
 		Super.s_state |= MINIX_VALID_FS;
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] minix: v3 super-block does not have s_state field
  2011-07-13 11:33   ` Sami Kerola
@ 2011-07-13 12:12     ` Karel Zak
  2011-07-13 14:54       ` Sami Kerola
  0 siblings, 1 reply; 12+ messages in thread
From: Karel Zak @ 2011-07-13 12:12 UTC (permalink / raw)
  To: kerolasa; +Cc: dave, util-linux

On Wed, Jul 13, 2011 at 01:33:03PM +0200, Sami Kerola wrote:
> On Wed, Jul 13, 2011 at 06:05, Davidlohr Bueso <dave@gnu.org> wrote:
> > I don't think we should always rely on having the kernel headers, that's
> > why the fallback is provided.
> [snip]
> > I think with this patch we address the issue without removing our
> > fallback.
> 
> Hi Dave et.al.
> 
> The preprocessor directive bellow is problematic. I don't see where,
> or how, it might get satisfied so I am afraid the 'fall back' is
> always in use regardless whether an user has kernel headers or not.
> 
> #ifdef KERNEL_INCLUDES_ARE_CLEAN
> 
> To fix that I modified the patch to use autoconf to check whether each
> necessary header is present, and use them if possible. Notice that
> Dave that I wrote your name to Reviewed-by patch line so it would be
> nice to hear that you're OK with the change. See the attachment, or
> pull from my repository.

 This is wrong way... the kernel types (e.g. u32, s64) are
 *unexpected* in util-linux. The new code should not use this junk. We
 have <stdint.h> and <inttypes.h>.
 
 The mkfs.minix should not depend on kernel headers. It's normal that
 we use our own (on kernel independent) copy of FS superbloks. See
 libblkid code.

 There is libblkid/src/superblocks/minix.c where are minix
 superblocks, it would be probably better to move the superblocks to
 iniclude/minix.h and use it everywhere.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] minix: v3 super-block does not have s_state field
  2011-07-13 12:12     ` Karel Zak
@ 2011-07-13 14:54       ` Sami Kerola
  2011-07-13 17:34         ` Karel Zak
  0 siblings, 1 reply; 12+ messages in thread
From: Sami Kerola @ 2011-07-13 14:54 UTC (permalink / raw)
  To: Karel Zak; +Cc: dave, util-linux

On Wed, Jul 13, 2011 at 14:12, Karel Zak <kzak@redhat.com> wrote:
> On Wed, Jul 13, 2011 at 01:33:03PM +0200, Sami Kerola wrote:
>> On Wed, Jul 13, 2011 at 06:05, Davidlohr Bueso <dave@gnu.org> wrote:
>> > I don't think we should always rely on having the kernel headers, that=
's
>> > why the fallback is provided.
>> [snip]
>> > I think with this patch we address the issue without removing our
>> > fallback.
>>
>> The preprocessor directive bellow is problematic. I don't see where,
>> or how, it might get satisfied so I am afraid the 'fall back' is
>> always in use regardless whether an user has kernel headers or not.
>>
>> #ifdef KERNEL_INCLUDES_ARE_CLEAN
>>
>> To fix that I modified the patch to use autoconf to check whether each
>> necessary header is present, and use them if possible. Notice that
>> Dave that I wrote your name to Reviewed-by patch line so it would be
>> nice to hear that you're OK with the change. See the attachment, or
>> pull from my repository.
>
> =A0This is wrong way... the kernel types (e.g. u32, s64) are
> =A0*unexpected* in util-linux. The new code should not use this junk. We
> =A0have <stdint.h> and <inttypes.h>.

Fixed.

> =A0The mkfs.minix should not depend on kernel headers. It's normal that
> =A0we use our own (on kernel independent) copy of FS superbloks. See
> =A0libblkid code.

By depend do you mean;

1. Distrust that kernel headers are present, and have alternative
copy, but use them when they are present.
2. Use always util-linux copy of structures ignoring the possible
header even they might be present.

I assumed the 1 is correct. If the 2 is correct then Dave's patch
should be applied and I'll redo rest of the patches.

> =A0There is libblkid/src/superblocks/minix.c where are minix
> =A0superblocks, it would be probably better to move the superblocks to
> =A0iniclude/minix.h and use it everywhere.

So something like the next 4 changes.

The following changes since commit bfa8d39b5826b928deb6d84aee3a4a1d6557364c=
:

  build-sys: fix spaces versus tabs conflict (2011-07-11 15:12:06 +0200)

are available in the git repository at:
  https://github.com/kerolasa/lelux-utiliteetit minix

Sami Kerola (5):
      minix: v3 super-block does not have s_state field
      minix: use data types from stdint.h
      minix: move minix.h to include directory
      libblkid: use superblock structure from minix.h
      libblkid: use BLOCK_SIZE from minix.h

 configure.ac                     |    5 ++
 disk-utils/Makefile.am           |    4 +-
 disk-utils/mkfs.minix.c          |    2 -
 include/Makefile.am              |    1 +
 {disk-utils =3D> include}/minix.h  |  148 ++++++++++++++++++++++----------=
------
 libblkid/src/superblocks/minix.c |   37 +---------
 6 files changed, 96 insertions(+), 101 deletions(-)
 rename {disk-utils =3D> include}/minix.h (59%)

--=20
=A0=A0 Sami Kerola
=A0=A0 http://www.iki.fi/kerolasa/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] minix: v3 super-block does not have s_state field
  2011-07-13 14:54       ` Sami Kerola
@ 2011-07-13 17:34         ` Karel Zak
  2011-07-14  2:03           ` Davidlohr Bueso
  0 siblings, 1 reply; 12+ messages in thread
From: Karel Zak @ 2011-07-13 17:34 UTC (permalink / raw)
  To: kerolasa; +Cc: dave, util-linux

On Wed, Jul 13, 2011 at 04:54:22PM +0200, Sami Kerola wrote:
> On Wed, Jul 13, 2011 at 14:12, Karel Zak <kzak@redhat.com> wrote:
> > On Wed, Jul 13, 2011 at 01:33:03PM +0200, Sami Kerola wrote:
> >> On Wed, Jul 13, 2011 at 06:05, Davidlohr Bueso <dave@gnu.org> wrote:
> >> > I don't think we should always rely on having the kernel headers, that's
> >> > why the fallback is provided.
> >> [snip]
> >> > I think with this patch we address the issue without removing our
> >> > fallback.
> >>
> >> The preprocessor directive bellow is problematic. I don't see where,
> >> or how, it might get satisfied so I am afraid the 'fall back' is
> >> always in use regardless whether an user has kernel headers or not.
> >>
> >> #ifdef KERNEL_INCLUDES_ARE_CLEAN
> >>
> >> To fix that I modified the patch to use autoconf to check whether each
> >> necessary header is present, and use them if possible. Notice that
> >> Dave that I wrote your name to Reviewed-by patch line so it would be
> >> nice to hear that you're OK with the change. See the attachment, or
> >> pull from my repository.
> >
> >  This is wrong way... the kernel types (e.g. u32, s64) are
> >  *unexpected* in util-linux. The new code should not use this junk. We
> >  have <stdint.h> and <inttypes.h>.
> 
> Fixed.
> 
> >  The mkfs.minix should not depend on kernel headers. It's normal that
> >  we use our own (on kernel independent) copy of FS superbloks. See
> >  libblkid code.
> 
> By depend do you mean;
> 
> 1. Distrust that kernel headers are present, and have alternative
> copy, but use them when they are present.
> 2. Use always util-linux copy of structures ignoring the possible
> header even they might be present.

 Ignore kernel, 2. is right in this case.

    Karel
-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] minix: v3 super-block does not have s_state field
  2011-07-13 17:34         ` Karel Zak
@ 2011-07-14  2:03           ` Davidlohr Bueso
  2011-07-14  9:18             ` Karel Zak
  0 siblings, 1 reply; 12+ messages in thread
From: Davidlohr Bueso @ 2011-07-14  2:03 UTC (permalink / raw)
  To: Karel Zak; +Cc: kerolasa, util-linux

On Wed, 2011-07-13 at 19:34 +0200, Karel Zak wrote:
> On Wed, Jul 13, 2011 at 04:54:22PM +0200, Sami Kerola wrote:
> > On Wed, Jul 13, 2011 at 14:12, Karel Zak <kzak@redhat.com> wrote:
> > > On Wed, Jul 13, 2011 at 01:33:03PM +0200, Sami Kerola wrote:
> > >> On Wed, Jul 13, 2011 at 06:05, Davidlohr Bueso <dave@gnu.org> wrote:
> > >> > I don't think we should always rely on having the kernel headers, =
that's
> > >> > why the fallback is provided.
> > >> [snip]
> > >> > I think with this patch we address the issue without removing our
> > >> > fallback.
> > >>
> > >> The preprocessor directive bellow is problematic. I don't see where,
> > >> or how, it might get satisfied so I am afraid the 'fall back' is
> > >> always in use regardless whether an user has kernel headers or not.
> > >>
> > >> #ifdef KERNEL_INCLUDES_ARE_CLEAN
> > >>
> > >> To fix that I modified the patch to use autoconf to check whether ea=
ch
> > >> necessary header is present, and use them if possible. Notice that
> > >> Dave that I wrote your name to Reviewed-by patch line so it would be
> > >> nice to hear that you're OK with the change. See the attachment, or
> > >> pull from my repository.
> > >
> > >  This is wrong way... the kernel types (e.g. u32, s64) are
> > >  *unexpected* in util-linux. The new code should not use this junk. W=
e
> > >  have <stdint.h> and <inttypes.h>.
> >=20
> > Fixed.
> >=20
> > >  The mkfs.minix should not depend on kernel headers. It's normal that
> > >  we use our own (on kernel independent) copy of FS superbloks. See
> > >  libblkid code.
> >=20
> > By depend do you mean;
> >=20
> > 1. Distrust that kernel headers are present, and have alternative
> > copy, but use them when they are present.
> > 2. Use always util-linux copy of structures ignoring the possible
> > header even they might be present.
>=20
>  Ignore kernel, 2. is right in this case.

Yep, I agree. Karel, if you have no objections then please apply my
patch as it does fix the sb mismatch.

Thanks.

>=20
>     Karel

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] minix: v3 super-block does not have s_state field
  2011-07-14  2:03           ` Davidlohr Bueso
@ 2011-07-14  9:18             ` Karel Zak
  2011-07-14 15:47               ` Sami Kerola
  0 siblings, 1 reply; 12+ messages in thread
From: Karel Zak @ 2011-07-14  9:18 UTC (permalink / raw)
  To: Davidlohr Bueso; +Cc: kerolasa, util-linux

On Wed, Jul 13, 2011 at 10:03:25PM -0400, Davidlohr Bueso wrote:
> >  Ignore kernel, 2. is right in this case.
> 
> Yep, I agree. Karel, if you have no objections then please apply my
> patch as it does fix the sb mismatch.

 Applied. It would be nice to clean up the superblocks definitions
 (use POSIX int types), move it to include/minix.h and use it for
 libblkid too.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] minix: v3 super-block does not have s_state field
  2011-07-14  9:18             ` Karel Zak
@ 2011-07-14 15:47               ` Sami Kerola
  2011-07-18 22:19                 ` Karel Zak
  0 siblings, 1 reply; 12+ messages in thread
From: Sami Kerola @ 2011-07-14 15:47 UTC (permalink / raw)
  To: Karel Zak; +Cc: Davidlohr Bueso, util-linux

On Thu, Jul 14, 2011 at 11:18, Karel Zak <kzak@redhat.com> wrote:
> =A0Applied. It would be nice to clean up the superblocks definitions
> =A0(use POSIX int types), move it to include/minix.h and use it for
> =A0libblkid too.

By any change would the following be the 'nice to have' you referred to?

The following changes since commit 872a1575e81f5ed1e871d4ed9558f43effe96423=
:

  dmesg: fix typo in usage() (2011-07-14 13:46:13 +0200)

are available in the git repository at:
  https://github.com/kerolasa/lelux-utiliteetit minix

Sami Kerola (7):
      include: minix.h: use data types from stdint.h
      include: remove kernel headers from minix.h
      include: move minix.h to include directory
      libblkid: use superblock structure from minix.h
      libblkid: use BLOCK_SIZE from minix.h
      include: minix.h use static variables
      libblkid: move MINIX_MAXPARTITIONS to minix.h

 disk-utils/Makefile.am           |    4 +-
 include/Makefile.am              |    1 +
 {disk-utils =3D> include}/minix.h  |  100 ++++++++++++++++++--------------=
------
 libblkid/src/partitions/minix.c  |    6 +--
 libblkid/src/superblocks/minix.c |   37 +-------------
 5 files changed, 54 insertions(+), 94 deletions(-)
 rename {disk-utils =3D> include}/minix.h (74%)

diff --git a/disk-utils/Makefile.am b/disk-utils/Makefile.am
index 7d018b5..dc1b9c7 100644
--- a/disk-utils/Makefile.am
+++ b/disk-utils/Makefile.am
@@ -15,8 +15,8 @@ dist_man_MANS =3D isosize.8 mkfs.8 mkswap.8 \

 sbin_PROGRAMS =3D mkfs mkswap fsck.minix mkfs.minix mkfs.bfs

-fsck_minix_SOURCES =3D fsck.minix.c minix.h $(top_srcdir)/lib/ismounted.c
-mkfs_minix_SOURCES =3D mkfs.minix.c minix.h mkfs.h $(utils_common)
$(top_srcdir)/lib/strutils.c
+fsck_minix_SOURCES =3D fsck.minix.c $(top_srcdir)/lib/ismounted.c
+mkfs_minix_SOURCES =3D mkfs.minix.c mkfs.h $(utils_common)
$(top_srcdir)/lib/strutils.c
 mkfs_bfs_SOURCES =3D mkfs.bfs.c $(utils_common)

 swaplabel_SOURCES =3D swaplabel.c $(utils_common)
diff --git a/include/Makefile.am b/include/Makefile.am
index b6d9bb1..acc0c1b 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -19,6 +19,7 @@ dist_noinst_HEADERS =3D \
 	mangle.h \
 	mbsalign.h \
 	md5.h \
+	minix.h \
 	nls.h \
 	pathnames.h \
 	procutils.h \
diff --git a/disk-utils/minix.h b/include/minix.h
similarity index 74%
rename from disk-utils/minix.h
rename to include/minix.h
index a13a2a4..e25946e 100644
--- a/disk-utils/minix.h
+++ b/include/minix.h
@@ -1,69 +1,65 @@
 #ifndef __MINIX_H__
 #define __MINIX_H__

-#ifdef KERNEL_INCLUDES_ARE_CLEAN
-
-#include <linux/fs.h>
-#include <linux/minix_fs.h>
-
-#else
-
-typedef unsigned char u8;
-typedef unsigned short u16;
-typedef unsigned int u32;
+#include <stdint.h>

 struct minix_inode {
-        u16 i_mode;
-        u16 i_uid;
-        u32 i_size;
-        u32 i_time;
-        u8  i_gid;
-        u8  i_nlinks;
-        u16 i_zone[9];
+	uint16_t i_mode;
+	uint16_t i_uid;
+	uint32_t i_size;
+	uint32_t i_time;
+	uint8_t  i_gid;
+	uint8_t  i_nlinks;
+	uint16_t i_zone[9];
 };

 struct minix2_inode {
-        u16 i_mode;
-        u16 i_nlinks;
-        u16 i_uid;
-        u16 i_gid;
-        u32 i_size;
-        u32 i_atime;
-        u32 i_mtime;
-        u32 i_ctime;
-        u32 i_zone[10];
+	uint16_t i_mode;
+	uint16_t i_nlinks;
+	uint16_t i_uid;
+	uint16_t i_gid;
+	uint32_t i_size;
+	uint32_t i_atime;
+	uint32_t i_mtime;
+	uint32_t i_ctime;
+	uint32_t i_zone[10];
 };

 struct minix_super_block {
-        u16 s_ninodes;
-        u16 s_nzones;
-        u16 s_imap_blocks;
-        u16 s_zmap_blocks;
-        u16 s_firstdatazone;
-        u16 s_log_zone_size;
-        u32 s_max_size;
-        u16 s_magic;
-        u16 s_state;
-        u32 s_zones;
+	uint16_t s_ninodes;
+	uint16_t s_nzones;
+	uint16_t s_imap_blocks;
+	uint16_t s_zmap_blocks;
+	uint16_t s_firstdatazone;
+	uint16_t s_log_zone_size;
+	uint32_t s_max_size;
+	uint16_t s_magic;
+	uint16_t s_state;
+	uint32_t s_zones;
 };

 /* V3 minix super-block data on disk */
 struct minix3_super_block {
-	u32 s_ninodes;
-	u16 s_pad0;
-	u16 s_imap_blocks;
-	u16 s_zmap_blocks;
-	u16 s_firstdatazone;
-	u16 s_log_zone_size;
-	u16 s_pad1;
-	u32 s_max_size;
-	u32 s_zones;
-	u16 s_magic;
-	u16 s_pad2;
-	u16 s_blocksize;
-	u8  s_disk_version;
+	uint32_t s_ninodes;
+	uint16_t s_pad0;
+	uint16_t s_imap_blocks;
+	uint16_t s_zmap_blocks;
+	uint16_t s_firstdatazone;
+	uint16_t s_log_zone_size;
+	uint16_t s_pad1;
+	uint32_t s_max_size;
+	uint32_t s_zones;
+	uint16_t s_magic;
+	uint16_t s_pad2;
+	uint16_t s_blocksize;
+	uint8_t  s_disk_version;
 };

+/*
+ * Minix subpartitions are always within primary dos partition.
+ */
+#define MINIX_MAXPARTITIONS 4
+
 #define BLOCK_SIZE_BITS 10
 #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)

@@ -82,16 +78,14 @@ struct minix3_super_block {
 #define MINIX2_SUPER_MAGIC2  0x2478	     /* minix V2 fs, 30 char names */
 #define MINIX3_SUPER_MAGIC   0x4d5a          /* minix V3 fs (60 char names=
) */

-#endif /* KERNEL_INCLUDES_ARE_CLEAN */
-
 #define Inode (((struct minix_inode *) inode_buffer)-1)
 #define Inode2 (((struct minix2_inode *) inode_buffer)-1)

 #define INODE_SIZE (sizeof(struct minix_inode))
 #define INODE2_SIZE (sizeof(struct minix2_inode))

-int fs_version =3D 1; /* this default value needs to change in a near futu=
re */
-char *super_block_buffer, *inode_buffer =3D NULL;
+static int fs_version =3D 1; /* this default value needs to change in a
near future */
+static char *super_block_buffer, *inode_buffer =3D NULL;

 static char *inode_map;
 static char *zone_map;
diff --git a/libblkid/src/partitions/minix.c b/libblkid/src/partitions/mini=
x.c
index 0887d1a..b67d2c7 100644
--- a/libblkid/src/partitions/minix.c
+++ b/libblkid/src/partitions/minix.c
@@ -13,11 +13,7 @@

 #include "partitions.h"
 #include "dos.h"
-
-/*
- * Minix subpartitions are always within primary dos partition.
- */
-#define MINIX_MAXPARTITIONS 4
+#include "minix.h"

 static int probe_minix_pt(blkid_probe pr, const struct blkid_idmag *mag)
 {
diff --git a/libblkid/src/superblocks/minix.c b/libblkid/src/superblocks/mi=
nix.c
index 3290c27..e821ea7 100644
--- a/libblkid/src/superblocks/minix.c
+++ b/libblkid/src/superblocks/minix.c
@@ -11,38 +11,7 @@

 #include <string.h>
 #include "superblocks.h"
-
-struct minix_super_block {
-        uint16_t s_ninodes;
-        uint16_t s_nzones;
-        uint16_t s_imap_blocks;
-        uint16_t s_zmap_blocks;
-        uint16_t s_firstdatazone;
-        uint16_t s_log_zone_size;
-        uint32_t s_max_size;
-        uint16_t s_magic;
-        uint16_t s_state;
-        uint32_t s_zones;
-};
-
-struct minix3_super_block {
-	uint32_t s_ninodes;
-	uint16_t s_pad0;
-	uint16_t s_imap_blocks;
-	uint16_t s_zmap_blocks;
-	uint16_t s_firstdatazone;
-	uint16_t s_log_zone_size;
-	uint16_t s_pad1;
-	uint32_t s_max_size;
-	uint32_t s_zones;
-	uint16_t s_magic;
-	uint16_t s_pad2;
-	uint16_t s_blocksize;
-	uint8_t  s_disk_version;
-};
-
-#define MINIX_BLOCK_SIZE_BITS 10
-#define MINIX_BLOCK_SIZE (1 << MINIX_BLOCK_SIZE_BITS)
+#include "minix.h"

 static int probe_minix(blkid_probe pr, const struct blkid_idmag *mag)
 {
@@ -76,9 +45,9 @@ static int probe_minix(blkid_probe pr, const struct
blkid_idmag *mag)
 		zones =3D version =3D=3D 2 ? sb->s_zones : sb->s_nzones;

 		/* sanity checks to be sure that the FS is really minix */
-		if (sb->s_imap_blocks * MINIX_BLOCK_SIZE * 8 < sb->s_ninodes + 1)
+		if (sb->s_imap_blocks * BLOCK_SIZE * 8 < sb->s_ninodes + 1)
 			return -1;
-		if (sb->s_zmap_blocks * MINIX_BLOCK_SIZE * 8 < zones -
sb->s_firstdatazone + 1)
+		if (sb->s_zmap_blocks * BLOCK_SIZE * 8 < zones - sb->s_firstdatazone + 1=
)
 			return -1;

 	} else if (version =3D=3D 3) {

--=20
=A0=A0 Sami Kerola
=A0=A0 http://www.iki.fi/kerolasa/

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] minix: v3 super-block does not have s_state field
  2011-07-14 15:47               ` Sami Kerola
@ 2011-07-18 22:19                 ` Karel Zak
  2011-07-20 18:53                   ` Sami Kerola
  0 siblings, 1 reply; 12+ messages in thread
From: Karel Zak @ 2011-07-18 22:19 UTC (permalink / raw)
  To: kerolasa; +Cc: Davidlohr Bueso, util-linux


 Sami, thanks for the patches, few notes:

On Thu, Jul 14, 2011 at 05:47:39PM +0200, Sami Kerola wrote:
> +++ b/include/minix.h
> @@ -1,69 +1,65 @@
>  #ifndef __MINIX_H__
>  #define __MINIX_H__

 we usually use UTIL_LINUX prefix, so #ifndef UTIL_LINUX_MINIX_H.

>  #define BLOCK_SIZE_BITS 10
>  #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)

 This is too generic. Please, use MINIX_ prefix.

>  #define Inode (((struct minix_inode *) inode_buffer)-1)
>  #define Inode2 (((struct minix2_inode *) inode_buffer)-1)
> 
>  #define INODE_SIZE (sizeof(struct minix_inode))
>  #define INODE2_SIZE (sizeof(struct minix2_inode))
> 
> -int fs_version = 1; /* this default value needs to change in a near future */
> -char *super_block_buffer, *inode_buffer = NULL;
> +static int fs_version = 1; /* this default value needs to change in a
> near future */
> +static char *super_block_buffer, *inode_buffer = NULL;
> 
>  static char *inode_map;
>  static char *zone_map;

 The global variables don't belong to this generic header file. The
 stuff around inode_buffer, fs_version and the inline functions are
 specific to the disk-utils/ utils. Please, add
 disk-utils/minix_programs.h and use it in {mkfs,fsck}.minix.

>  		/* sanity checks to be sure that the FS is really minix */
> -		if (sb->s_imap_blocks * MINIX_BLOCK_SIZE * 8 < sb->s_ninodes + 1)
> +		if (sb->s_imap_blocks * BLOCK_SIZE * 8 < sb->s_ninodes + 1)
>  			return -1;
> -		if (sb->s_zmap_blocks * MINIX_BLOCK_SIZE * 8 < zones -
> sb->s_firstdatazone + 1)
> +		if (sb->s_zmap_blocks * BLOCK_SIZE * 8 < zones - sb->s_firstdatazone + 1)
>  			return -1;

 No, please...

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] minix: v3 super-block does not have s_state field
  2011-07-18 22:19                 ` Karel Zak
@ 2011-07-20 18:53                   ` Sami Kerola
  2011-07-21 11:21                     ` Karel Zak
  0 siblings, 1 reply; 12+ messages in thread
From: Sami Kerola @ 2011-07-20 18:53 UTC (permalink / raw)
  To: Karel Zak; +Cc: Davidlohr Bueso, util-linux

On Tue, Jul 19, 2011 at 00:19, Karel Zak <kzak@redhat.com> wrote:
> On Thu, Jul 14, 2011 at 05:47:39PM +0200, Sami Kerola wrote:
>> +++ b/include/minix.h
>> @@ -1,69 +1,65 @@
>> =A0#ifndef __MINIX_H__
>> =A0#define __MINIX_H__
>
> =A0we usually use UTIL_LINUX prefix, so #ifndef UTIL_LINUX_MINIX_H.

Changed.

>> =A0#define BLOCK_SIZE_BITS 10
>> =A0#define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
>
> =A0This is too generic. Please, use MINIX_ prefix.

Adding MINIX_ prefix will cause a greater change, but as you wish I did tha=
t.

>> =A0#define Inode (((struct minix_inode *) inode_buffer)-1)
>> =A0#define Inode2 (((struct minix2_inode *) inode_buffer)-1)
>>
>> =A0#define INODE_SIZE (sizeof(struct minix_inode))
>> =A0#define INODE2_SIZE (sizeof(struct minix2_inode))
>>
>> -int fs_version =3D 1; /* this default value needs to change in a near f=
uture */
>> -char *super_block_buffer, *inode_buffer =3D NULL;
>> +static int fs_version =3D 1; /* this default value needs to change in a
>> near future */
>> +static char *super_block_buffer, *inode_buffer =3D NULL;
>>
>> =A0static char *inode_map;
>> =A0static char *zone_map;
>
> =A0The global variables don't belong to this generic header file. The
> =A0stuff around inode_buffer, fs_version and the inline functions are
> =A0specific to the disk-utils/ utils. Please, add
> =A0disk-utils/minix_programs.h and use it in {mkfs,fsck}.minix.

Done.

The following changes since commit 872a1575e81f5ed1e871d4ed9558f43effe96423=
:

  dmesg: fix typo in usage() (2011-07-14 13:46:13 +0200)

are available in the git repository at:
  https://github.com/kerolasa/lelux-utiliteetit minix

Sami Kerola (7):
      include: minix.h: use data types from stdint.h
      include: remove kernel headers from minix.h
      include: move minix.h to include directory
      libblkid: use superblock structure from minix.h
      libblkid: use MINIX_BLOCK_SIZE from minix.h
      minix: move globals and inline functions to minix_programs.h
      libblkid: move MINIX_MAXPARTITIONS to minix.h

 disk-utils/Makefile.am           |    4 +-
 disk-utils/fsck.minix.c          |   99 ++++++++++---------
 disk-utils/minix.h               |  202 ----------------------------------=
----
 disk-utils/minix_programs.h      |  113 +++++++++++++++++++++
 disk-utils/mkfs.minix.c          |   77 +++++++-------
 include/Makefile.am              |    1 +
 include/minix.h                  |   97 ++++++++++++++++++
 libblkid/src/partitions/minix.c  |    6 +-
 libblkid/src/superblocks/minix.c |   33 +------
 9 files changed, 304 insertions(+), 328 deletions(-)
 delete mode 100644 disk-utils/minix.h
 create mode 100644 disk-utils/minix_programs.h
 create mode 100644 include/minix.h

--=20
=A0=A0 Sami Kerola
=A0=A0 http://www.iki.fi/kerolasa/

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] minix: v3 super-block does not have s_state field
  2011-07-20 18:53                   ` Sami Kerola
@ 2011-07-21 11:21                     ` Karel Zak
  0 siblings, 0 replies; 12+ messages in thread
From: Karel Zak @ 2011-07-21 11:21 UTC (permalink / raw)
  To: kerolasa; +Cc: Davidlohr Bueso, util-linux

On Wed, Jul 20, 2011 at 08:53:11PM +0200, Sami Kerola wrote:
>  disk-utils/Makefile.am           |    4 +-
>  disk-utils/fsck.minix.c          |   99 ++++++++++---------
>  disk-utils/minix.h               |  202 --------------------------------------
>  disk-utils/minix_programs.h      |  113 +++++++++++++++++++++
>  disk-utils/mkfs.minix.c          |   77 +++++++-------
>  include/Makefile.am              |    1 +
>  include/minix.h                  |   97 ++++++++++++++++++
>  libblkid/src/partitions/minix.c  |    6 +-
>  libblkid/src/superblocks/minix.c |   33 +------

 Merged. I have removed the "static" variables from the
 minix_programs.h file. It's better to use normal global variables.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-07-21 11:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-12 15:50 [PATCH] minix: v3 super-block does not have s_state field Sami Kerola
2011-07-13  4:05 ` Davidlohr Bueso
2011-07-13 11:33   ` Sami Kerola
2011-07-13 12:12     ` Karel Zak
2011-07-13 14:54       ` Sami Kerola
2011-07-13 17:34         ` Karel Zak
2011-07-14  2:03           ` Davidlohr Bueso
2011-07-14  9:18             ` Karel Zak
2011-07-14 15:47               ` Sami Kerola
2011-07-18 22:19                 ` Karel Zak
2011-07-20 18:53                   ` Sami Kerola
2011-07-21 11:21                     ` Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.