aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/hpfs/dir.c10
-rw-r--r--fs/hpfs/dnode.c13
-rw-r--r--fs/hpfs/ea.c5
-rw-r--r--fs/hpfs/inode.c5
-rw-r--r--fs/hpfs/map.c20
5 files changed, 37 insertions, 16 deletions
diff --git a/fs/hpfs/dir.c b/fs/hpfs/dir.c
index ecc9180645ae..594f9c428fc2 100644
--- a/fs/hpfs/dir.c
+++ b/fs/hpfs/dir.c
@@ -84,7 +84,8 @@ static int hpfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
84 } 84 }
85 if (!fno->dirflag) { 85 if (!fno->dirflag) {
86 e = 1; 86 e = 1;
87 hpfs_error(inode->i_sb, "not a directory, fnode %08x",inode->i_ino); 87 hpfs_error(inode->i_sb, "not a directory, fnode %08lx",
88 (unsigned long)inode->i_ino);
88 } 89 }
89 if (hpfs_inode->i_dno != fno->u.external[0].disk_secno) { 90 if (hpfs_inode->i_dno != fno->u.external[0].disk_secno) {
90 e = 1; 91 e = 1;
@@ -144,8 +145,11 @@ static int hpfs_readdir(struct file *filp, void *dirent, filldir_t filldir)
144 } 145 }
145 if (de->first || de->last) { 146 if (de->first || de->last) {
146 if (hpfs_sb(inode->i_sb)->sb_chk) { 147 if (hpfs_sb(inode->i_sb)->sb_chk) {
147 if (de->first && !de->last && (de->namelen != 2 || de ->name[0] != 1 || de->name[1] != 1)) hpfs_error(inode->i_sb, "hpfs_readdir: bad ^A^A entry; pos = %08x", old_pos); 148 if (de->first && !de->last && (de->namelen != 2
148 if (de->last && (de->namelen != 1 || de ->name[0] != 255)) hpfs_error(inode->i_sb, "hpfs_readdir: bad \\377 entry; pos = %08x", old_pos); 149 || de ->name[0] != 1 || de->name[1] != 1))
150 hpfs_error(inode->i_sb, "hpfs_readdir: bad ^A^A entry; pos = %08lx", old_pos);
151 if (de->last && (de->namelen != 1 || de ->name[0] != 255))
152 hpfs_error(inode->i_sb, "hpfs_readdir: bad \\377 entry; pos = %08lx", old_pos);
149 } 153 }
150 hpfs_brelse4(&qbh); 154 hpfs_brelse4(&qbh);
151 goto again; 155 goto again;
diff --git a/fs/hpfs/dnode.c b/fs/hpfs/dnode.c
index 229ff2fb1809..fe83c2b7d2d8 100644
--- a/fs/hpfs/dnode.c
+++ b/fs/hpfs/dnode.c
@@ -533,10 +533,13 @@ static void delete_empty_dnode(struct inode *i, dnode_secno dno)
533 struct buffer_head *bh; 533 struct buffer_head *bh;
534 struct dnode *d1; 534 struct dnode *d1;
535 struct quad_buffer_head qbh1; 535 struct quad_buffer_head qbh1;
536 if (hpfs_sb(i->i_sb)->sb_chk) if (up != i->i_ino) { 536 if (hpfs_sb(i->i_sb)->sb_chk)
537 hpfs_error(i->i_sb, "bad pointer to fnode, dnode %08x, pointing to %08x, should be %08x", dno, up, i->i_ino); 537 if (up != i->i_ino) {
538 hpfs_error(i->i_sb,
539 "bad pointer to fnode, dnode %08x, pointing to %08x, should be %08lx",
540 dno, up, (unsigned long)i->i_ino);
538 return; 541 return;
539 } 542 }
540 if ((d1 = hpfs_map_dnode(i->i_sb, down, &qbh1))) { 543 if ((d1 = hpfs_map_dnode(i->i_sb, down, &qbh1))) {
541 d1->up = up; 544 d1->up = up;
542 d1->root_dnode = 1; 545 d1->root_dnode = 1;
@@ -851,7 +854,9 @@ struct hpfs_dirent *map_pos_dirent(struct inode *inode, loff_t *posp,
851 /* Going to the next dirent */ 854 /* Going to the next dirent */
852 if ((d = de_next_de(de)) < dnode_end_de(dnode)) { 855 if ((d = de_next_de(de)) < dnode_end_de(dnode)) {
853 if (!(++*posp & 077)) { 856 if (!(++*posp & 077)) {
854 hpfs_error(inode->i_sb, "map_pos_dirent: pos crossed dnode boundary; pos = %08x", *posp); 857 hpfs_error(inode->i_sb,
858 "map_pos_dirent: pos crossed dnode boundary; pos = %08llx",
859 (unsigned long long)*posp);
855 goto bail; 860 goto bail;
856 } 861 }
857 /* We're going down the tree */ 862 /* We're going down the tree */
diff --git a/fs/hpfs/ea.c b/fs/hpfs/ea.c
index 66339dc030e4..547a8384571f 100644
--- a/fs/hpfs/ea.c
+++ b/fs/hpfs/ea.c
@@ -243,8 +243,9 @@ void hpfs_set_ea(struct inode *inode, struct fnode *fnode, char *key, char *data
243 fnode->ea_offs = 0xc4; 243 fnode->ea_offs = 0xc4;
244 } 244 }
245 if (fnode->ea_offs < 0xc4 || fnode->ea_offs + fnode->acl_size_s + fnode->ea_size_s > 0x200) { 245 if (fnode->ea_offs < 0xc4 || fnode->ea_offs + fnode->acl_size_s + fnode->ea_size_s > 0x200) {
246 hpfs_error(s, "fnode %08x: ea_offs == %03x, ea_size_s == %03x", 246 hpfs_error(s, "fnode %08lx: ea_offs == %03x, ea_size_s == %03x",
247 inode->i_ino, fnode->ea_offs, fnode->ea_size_s); 247 (unsigned long)inode->i_ino,
248 fnode->ea_offs, fnode->ea_size_s);
248 return; 249 return;
249 } 250 }
250 if ((fnode->ea_size_s || !fnode->ea_size_l) && 251 if ((fnode->ea_size_s || !fnode->ea_size_l) &&
diff --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c
index 7faef8544f32..85d3e1d9ac00 100644
--- a/fs/hpfs/inode.c
+++ b/fs/hpfs/inode.c
@@ -251,7 +251,10 @@ void hpfs_write_inode_nolock(struct inode *i)
251 de->file_size = 0; 251 de->file_size = 0;
252 hpfs_mark_4buffers_dirty(&qbh); 252 hpfs_mark_4buffers_dirty(&qbh);
253 hpfs_brelse4(&qbh); 253 hpfs_brelse4(&qbh);
254 } else hpfs_error(i->i_sb, "directory %08x doesn't have '.' entry", i->i_ino); 254 } else
255 hpfs_error(i->i_sb,
256 "directory %08lx doesn't have '.' entry",
257 (unsigned long)i->i_ino);
255 } 258 }
256 mark_buffer_dirty(bh); 259 mark_buffer_dirty(bh);
257 brelse(bh); 260 brelse(bh);
diff --git a/fs/hpfs/map.c b/fs/hpfs/map.c
index 0fecdac22e4e..c4724589b2eb 100644
--- a/fs/hpfs/map.c
+++ b/fs/hpfs/map.c
@@ -126,32 +126,40 @@ struct fnode *hpfs_map_fnode(struct super_block *s, ino_t ino, struct buffer_hea
126 struct extended_attribute *ea; 126 struct extended_attribute *ea;
127 struct extended_attribute *ea_end; 127 struct extended_attribute *ea_end;
128 if (fnode->magic != FNODE_MAGIC) { 128 if (fnode->magic != FNODE_MAGIC) {
129 hpfs_error(s, "bad magic on fnode %08x", ino); 129 hpfs_error(s, "bad magic on fnode %08lx",
130 (unsigned long)ino);
130 goto bail; 131 goto bail;
131 } 132 }
132 if (!fnode->dirflag) { 133 if (!fnode->dirflag) {
133 if ((unsigned)fnode->btree.n_used_nodes + (unsigned)fnode->btree.n_free_nodes != 134 if ((unsigned)fnode->btree.n_used_nodes + (unsigned)fnode->btree.n_free_nodes !=
134 (fnode->btree.internal ? 12 : 8)) { 135 (fnode->btree.internal ? 12 : 8)) {
135 hpfs_error(s, "bad number of nodes in fnode %08x", ino); 136 hpfs_error(s,
137 "bad number of nodes in fnode %08lx",
138 (unsigned long)ino);
136 goto bail; 139 goto bail;
137 } 140 }
138 if (fnode->btree.first_free != 141 if (fnode->btree.first_free !=
139 8 + fnode->btree.n_used_nodes * (fnode->btree.internal ? 8 : 12)) { 142 8 + fnode->btree.n_used_nodes * (fnode->btree.internal ? 8 : 12)) {
140 hpfs_error(s, "bad first_free pointer in fnode %08x", ino); 143 hpfs_error(s,
144 "bad first_free pointer in fnode %08lx",
145 (unsigned long)ino);
141 goto bail; 146 goto bail;
142 } 147 }
143 } 148 }
144 if (fnode->ea_size_s && ((signed int)fnode->ea_offs < 0xc4 || 149 if (fnode->ea_size_s && ((signed int)fnode->ea_offs < 0xc4 ||
145 (signed int)fnode->ea_offs + fnode->acl_size_s + fnode->ea_size_s > 0x200)) { 150 (signed int)fnode->ea_offs + fnode->acl_size_s + fnode->ea_size_s > 0x200)) {
146 hpfs_error(s, "bad EA info in fnode %08x: ea_offs == %04x ea_size_s == %04x", 151 hpfs_error(s,
147 ino, fnode->ea_offs, fnode->ea_size_s); 152 "bad EA info in fnode %08lx: ea_offs == %04x ea_size_s == %04x",
153 (unsigned long)ino,
154 fnode->ea_offs, fnode->ea_size_s);
148 goto bail; 155 goto bail;
149 } 156 }
150 ea = fnode_ea(fnode); 157 ea = fnode_ea(fnode);
151 ea_end = fnode_end_ea(fnode); 158 ea_end = fnode_end_ea(fnode);
152 while (ea != ea_end) { 159 while (ea != ea_end) {
153 if (ea > ea_end) { 160 if (ea > ea_end) {
154 hpfs_error(s, "bad EA in fnode %08x", ino); 161 hpfs_error(s, "bad EA in fnode %08lx",
162 (unsigned long)ino);
155 goto bail; 163 goto bail;
156 } 164 }
157 ea = next_ea(ea); 165 ea = next_ea(ea);