~ubuntu-branches/ubuntu/quantal/silo/quantal

« back to all changes in this revision

Viewing changes to debian/patches/10-silo_new_ufs_superblock.patch

  • Committer: Bazaar Package Importer
  • Author(s): Fabio M. Di Nitto
  • Date: 2007-10-25 09:28:08 UTC
  • mfrom: (15.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071025092808-1yhj12t7s4zqsfu5
Tags: 1.4.13a+git20070930-1ubuntu1
* Merge from debian unstable, remaining changes:
  - Build with -fno-stack-protector.
  - Change silo.postinst to automatically update the boot block without
    invoking siloconfig and keep asking questions on upgrades.
  - Convert silo.conf to use /dev/disk/by-uuid.
  - Ubuntu maintainer foobar.
  - Fix debian/rules call to dh_installdocs.
  - Drop the requirement of gcc-4.1 and start using default gcc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
diff -aur a/second/fs/ufs.c b/second/fs/ufs.c
2
 
--- a/second/fs/ufs.c   2006-06-01 10:24:53.000000000 -0700
3
 
+++ b/second/fs/ufs.c   2006-10-16 20:11:00.000000000 -0700
4
 
@@ -40,28 +40,18 @@
5
 
 
6
 
 ino_t inode = 0;
7
 
 
8
 
-#ifdef UFS_CIGAM
9
 
-/* Apparently new header */
10
 
-
11
 
 #define ufsi_size(x) ((unsigned int)((x)->ui_size))
12
 
 #define ufsi_db(x) ((unsigned int *)((x)->ui_u2.ui_addr.ui_db))
13
 
 #define ufsi_ib(x) ((unsigned int *)((x)->ui_u2.ui_addr.ui_ib))
14
 
 #define ufsd_namlen(x) ((unsigned char)((x)->d_u.d_44.d_namlen))
15
 
 
16
 
-#ifdef UFS_MINFREE
17
 
-/* Apparently even newer header */
18
 
-#define ufs_superblock ufs_super_block
19
 
+struct ufs_superblock_full {
20
 
+       struct ufs_super_block_first first;
21
 
+       struct ufs_super_block_second second;
22
 
+       struct ufs_super_block_third third;
23
 
+};
24
 
+#define ufs_superblock ufs_super_block_first
25
 
 #define ufs_direct ufs_dir_entry
26
 
-#endif
27
 
-
28
 
-#else
29
 
-
30
 
-#define ufsi_size(x) (((x)->ui_size.val[1]))
31
 
-#define ufsi_db(x) ((unsigned int *)((x)->ui_db))
32
 
-#define ufsi_ib(x) ((unsigned int *)((x)->ui_ib))
33
 
-#define ufsd_namlen(x) ((unsigned char)((x)->d_namlen))
34
 
-
35
 
-#endif
36
 
 
37
 
 #ifndef S_ISLNK
38
 
 #include <sys/stat.h>
39
 
@@ -92,25 +82,22 @@
40
 
         return p;
41
 
 }
42
 
 
43
 
-static struct ufs_superblock *ufs_read_super(ufs_filsys fs)
44
 
+static struct ufs_superblock_full *ufs_read_super(ufs_filsys fs)
45
 
 {
46
 
-    struct ufs_superblock *usb;
47
 
+    struct ufs_superblock_full *usb;
48
 
 
49
 
-    usb = (struct ufs_superblock *) malloc (2048);
50
 
+    usb = (struct ufs_superblock_full *) malloc (2048);
51
 
     if (!usb) return 0;
52
 
     if (io_channel_read_blk (fs->io, UFS_SBLOCK/1024, -2048, (char *)usb))
53
 
         return 0;
54
 
-    if (usb->fs_magic != UFS_MAGIC) {
55
 
-       /* XXX - replace hard-coded constant with a byte-swap macro */
56
 
-       if (usb->fs_magic == 0x54190100) {
57
 
-       }
58
 
+    if (usb->third.fs_magic != UFS_MAGIC) {
59
 
        return 0;
60
 
     }
61
 
-    if (usb->fs_bsize != UFS_BSIZE)
62
 
+    if (usb->first.fs_bsize != UFS_BSIZE)
63
 
         return 0;
64
 
-    if (usb->fs_fsize != UFS_FSIZE)
65
 
+    if (usb->first.fs_fsize != UFS_FSIZE)
66
 
         return 0;
67
 
-    io_channel_set_blksize (fs->io, usb->fs_fsize);
68
 
+    io_channel_set_blksize (fs->io, usb->first.fs_fsize);
69
 
     return usb;
70
 
 }
71