tags 393114 patch
thanks

Hi,

This failure appeared due to the change in linux-kernel-headers 
2.6.18. In the earlier versions of l-k-h there was struct 
ufs_super_block, in the newer ones this struct has been split into 
ufs_super_block_{first,second,third} for some reason. Attached patch 
makes it possible to build silo again with l-k-h (>= 2.6.18). I'm not 
uploading this package yet, because I heard from RM team that 
accepting new l-k-h into unstable was an oversight, and it is not 
decided yet whether it will be allowed to stay or we'll go back to the 
earlier version. As soon as this situation clears up, I'll upload a 
fixed package.

Best regards, 
-- 
Jurij Smakov                                           [EMAIL PROTECTED]
Key: http://www.wooyd.org/pgpkey/                      KeyID: C99E03CC
diff -aur a/second/fs/ufs.c b/second/fs/ufs.c
--- a/second/fs/ufs.c   2006-06-01 10:24:53.000000000 -0700
+++ b/second/fs/ufs.c   2006-10-16 20:11:00.000000000 -0700
@@ -40,28 +40,18 @@
 
 ino_t inode = 0;
 
-#ifdef UFS_CIGAM
-/* Apparently new header */
-
 #define ufsi_size(x) ((unsigned int)((x)->ui_size))
 #define ufsi_db(x) ((unsigned int *)((x)->ui_u2.ui_addr.ui_db))
 #define ufsi_ib(x) ((unsigned int *)((x)->ui_u2.ui_addr.ui_ib))
 #define ufsd_namlen(x) ((unsigned char)((x)->d_u.d_44.d_namlen))
 
-#ifdef UFS_MINFREE
-/* Apparently even newer header */
-#define ufs_superblock ufs_super_block
+struct ufs_superblock_full {
+       struct ufs_super_block_first first;
+       struct ufs_super_block_second second;
+       struct ufs_super_block_third third;
+};
+#define ufs_superblock ufs_super_block_first
 #define ufs_direct ufs_dir_entry
-#endif
-
-#else
-
-#define ufsi_size(x) (((x)->ui_size.val[1]))
-#define ufsi_db(x) ((unsigned int *)((x)->ui_db))
-#define ufsi_ib(x) ((unsigned int *)((x)->ui_ib))
-#define ufsd_namlen(x) ((unsigned char)((x)->d_namlen))
-
-#endif
 
 #ifndef S_ISLNK
 #include <sys/stat.h>
@@ -92,25 +82,22 @@
         return p;
 }
 
-static struct ufs_superblock *ufs_read_super(ufs_filsys fs)
+static struct ufs_superblock_full *ufs_read_super(ufs_filsys fs)
 {
-    struct ufs_superblock *usb;
+    struct ufs_superblock_full *usb;
 
-    usb = (struct ufs_superblock *) malloc (2048);
+    usb = (struct ufs_superblock_full *) malloc (2048);
     if (!usb) return 0;
     if (io_channel_read_blk (fs->io, UFS_SBLOCK/1024, -2048, (char *)usb))
         return 0;
-    if (usb->fs_magic != UFS_MAGIC) {
-       /* XXX - replace hard-coded constant with a byte-swap macro */
-       if (usb->fs_magic == 0x54190100) {
-       }
+    if (usb->third.fs_magic != UFS_MAGIC) {
        return 0;
     }
-    if (usb->fs_bsize != UFS_BSIZE)
+    if (usb->first.fs_bsize != UFS_BSIZE)
         return 0;
-    if (usb->fs_fsize != UFS_FSIZE)
+    if (usb->first.fs_fsize != UFS_FSIZE)
         return 0;
-    io_channel_set_blksize (fs->io, usb->fs_fsize);
+    io_channel_set_blksize (fs->io, usb->first.fs_fsize);
     return usb;
 }
 

Reply via email to