Magellan Linux

Diff of /trunk/mkinitrd-magellan/busybox/util-linux/volume_id/unused_ufs.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 983 by niro, Fri Apr 24 18:33:46 2009 UTC revision 984 by niro, Sun May 30 11:32:42 2010 UTC
# Line 73  struct ufs_super_block { Line 73  struct ufs_super_block {
73   uint32_t cs_nbfree;   uint32_t cs_nbfree;
74   uint32_t cs_nifree;   uint32_t cs_nifree;
75   uint32_t cs_nffree;   uint32_t cs_nffree;
76   } __attribute__((__packed__)) fs_cstotal;   } PACKED fs_cstotal;
77   int8_t fs_fmod;   int8_t fs_fmod;
78   int8_t fs_clean;   int8_t fs_clean;
79   int8_t fs_ronly;   int8_t fs_ronly;
# Line 86  struct ufs_super_block { Line 86  struct ufs_super_block {
86   uint32_t fs_maxcluster;   uint32_t fs_maxcluster;
87   uint32_t fs_cpc;   uint32_t fs_cpc;
88   uint16_t fs_opostbl[16][8];   uint16_t fs_opostbl[16][8];
89   } __attribute__((__packed__)) fs_u1;   } PACKED fs_u1;
90   struct {   struct {
91   int8_t fs_fsmnt[468];   int8_t fs_fsmnt[468];
92   uint8_t fs_volname[32];   uint8_t fs_volname[32];
# Line 109  struct ufs_super_block { Line 109  struct ufs_super_block {
109   uint64_t cs_nffree;   uint64_t cs_nffree;
110   uint64_t cs_numclusters;   uint64_t cs_numclusters;
111   uint64_t cs_spare[3];   uint64_t cs_spare[3];
112   } __attribute__((__packed__)) fs_cstotal;   } PACKED fs_cstotal;
113   struct ufs_timeval {   struct ufs_timeval {
114   int32_t tv_sec;   int32_t tv_sec;
115   int32_t tv_usec;   int32_t tv_usec;
116   } __attribute__((__packed__)) fs_time;   } PACKED fs_time;
117   int64_t fs_size;   int64_t fs_size;
118   int64_t fs_dsize;   int64_t fs_dsize;
119   uint64_t fs_csaddr;   uint64_t fs_csaddr;
120   int64_t fs_pendingblocks;   int64_t fs_pendingblocks;
121   int32_t fs_pendinginodes;   int32_t fs_pendinginodes;
122   } __attribute__((__packed__)) fs_u2;   } PACKED fs_u2;
123   }  fs_u11;   }  fs_u11;
124   union {   union {
125   struct {   struct {
# Line 129  struct ufs_super_block { Line 129  struct ufs_super_block {
129   int32_t fs_state;   int32_t fs_state;
130   uint32_t fs_qbmask[2];   uint32_t fs_qbmask[2];
131   uint32_t fs_qfmask[2];   uint32_t fs_qfmask[2];
132   } __attribute__((__packed__)) fs_sun;   } PACKED fs_sun;
133   struct {   struct {
134   int32_t fs_sparecon[53];   int32_t fs_sparecon[53];
135   int32_t fs_reclaim;   int32_t fs_reclaim;
# Line 137  struct ufs_super_block { Line 137  struct ufs_super_block {
137   uint32_t fs_npsect;   uint32_t fs_npsect;
138   uint32_t fs_qbmask[2];   uint32_t fs_qbmask[2];
139   uint32_t fs_qfmask[2];   uint32_t fs_qfmask[2];
140   } __attribute__((__packed__)) fs_sunx86;   } PACKED fs_sunx86;
141   struct {   struct {
142   int32_t fs_sparecon[50];   int32_t fs_sparecon[50];
143   int32_t fs_contigsumsize;   int32_t fs_contigsumsize;
# Line 147  struct ufs_super_block { Line 147  struct ufs_super_block {
147   uint32_t fs_qbmask[2];   uint32_t fs_qbmask[2];
148   uint32_t fs_qfmask[2];   uint32_t fs_qfmask[2];
149   int32_t fs_state;   int32_t fs_state;
150   } __attribute__((__packed__)) fs_44;   } PACKED fs_44;
151   } fs_u2;   } fs_u2;
152   int32_t fs_postblformat;   int32_t fs_postblformat;
153   int32_t fs_nrpos;   int32_t fs_nrpos;
# Line 155  struct ufs_super_block { Line 155  struct ufs_super_block {
155   int32_t fs_rotbloff;   int32_t fs_rotbloff;
156   uint32_t fs_magic;   uint32_t fs_magic;
157   uint8_t fs_space[1];   uint8_t fs_space[1];
158  } __attribute__((__packed__));  } PACKED;
159    
160  #define UFS_MAGIC 0x00011954  #define UFS_MAGIC 0x00011954
161  #define UFS2_MAGIC 0x19540119  #define UFS2_MAGIC 0x19540119
162  #define UFS_MAGIC_FEA 0x00195612  #define UFS_MAGIC_FEA 0x00195612
163  #define UFS_MAGIC_LFN 0x00095014  #define UFS_MAGIC_LFN 0x00095014
164    
165  int volume_id_probe_ufs(struct volume_id *id, uint64_t off)  int FAST_FUNC volume_id_probe_ufs(struct volume_id *id, uint64_t off)
166  {  {
167   static const short offsets[] = { 0, 8, 64, 256 };   static const short offsets[] = { 0, 8, 64, 256 };
168    

Legend:
Removed from v.983  
changed lines
  Added in v.984