diff options
author | Anton Salikhmetov <alexo@tuxera.com> | 2010-12-16 11:08:38 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@tuxera.com> | 2010-12-16 12:08:45 -0500 |
commit | 2753cc281c9a0e8a0a45ee2b8110866a9fe63bdd (patch) | |
tree | d28794ef990637cfcd734a8b467f119e6d69dac1 /fs/hfsplus/catalog.c | |
parent | 596276c3571e2108f4b336be545ece2eacf3da59 (diff) |
hfsplus: over 80 character lines clean-up
Match coding style line length limitation where checkpatch.pl
reported over-80-character-line warnings.
Signed-off-by: Anton Salikhmetov <alexo@tuxera.com>
Signed-off-by: Christoph Hellwig <hch@tuxera.com>
Diffstat (limited to 'fs/hfsplus/catalog.c')
-rw-r--r-- | fs/hfsplus/catalog.c | 75 |
1 files changed, 50 insertions, 25 deletions
diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c index 0aa40b36a9e7..b4ba1b319333 100644 --- a/fs/hfsplus/catalog.c +++ b/fs/hfsplus/catalog.c | |||
@@ -91,7 +91,8 @@ void hfsplus_cat_set_perms(struct inode *inode, struct hfsplus_perm *perms) | |||
91 | perms->dev = 0; | 91 | perms->dev = 0; |
92 | } | 92 | } |
93 | 93 | ||
94 | static int hfsplus_cat_build_record(hfsplus_cat_entry *entry, u32 cnid, struct inode *inode) | 94 | static int hfsplus_cat_build_record(hfsplus_cat_entry *entry, |
95 | u32 cnid, struct inode *inode) | ||
95 | { | 96 | { |
96 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb); | 97 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb); |
97 | 98 | ||
@@ -128,20 +129,32 @@ static int hfsplus_cat_build_record(hfsplus_cat_entry *entry, u32 cnid, struct i | |||
128 | if (cnid == inode->i_ino) { | 129 | if (cnid == inode->i_ino) { |
129 | hfsplus_cat_set_perms(inode, &file->permissions); | 130 | hfsplus_cat_set_perms(inode, &file->permissions); |
130 | if (S_ISLNK(inode->i_mode)) { | 131 | if (S_ISLNK(inode->i_mode)) { |
131 | file->user_info.fdType = cpu_to_be32(HFSP_SYMLINK_TYPE); | 132 | file->user_info.fdType = |
132 | file->user_info.fdCreator = cpu_to_be32(HFSP_SYMLINK_CREATOR); | 133 | cpu_to_be32(HFSP_SYMLINK_TYPE); |
134 | file->user_info.fdCreator = | ||
135 | cpu_to_be32(HFSP_SYMLINK_CREATOR); | ||
133 | } else { | 136 | } else { |
134 | file->user_info.fdType = cpu_to_be32(sbi->type); | 137 | file->user_info.fdType = |
135 | file->user_info.fdCreator = cpu_to_be32(sbi->creator); | 138 | cpu_to_be32(sbi->type); |
139 | file->user_info.fdCreator = | ||
140 | cpu_to_be32(sbi->creator); | ||
136 | } | 141 | } |
137 | if ((file->permissions.rootflags | file->permissions.userflags) & HFSPLUS_FLG_IMMUTABLE) | 142 | if (HFSPLUS_FLG_IMMUTABLE & |
138 | file->flags |= cpu_to_be16(HFSPLUS_FILE_LOCKED); | 143 | (file->permissions.rootflags | |
144 | file->permissions.userflags)) | ||
145 | file->flags |= | ||
146 | cpu_to_be16(HFSPLUS_FILE_LOCKED); | ||
139 | } else { | 147 | } else { |
140 | file->user_info.fdType = cpu_to_be32(HFSP_HARDLINK_TYPE); | 148 | file->user_info.fdType = |
141 | file->user_info.fdCreator = cpu_to_be32(HFSP_HFSPLUS_CREATOR); | 149 | cpu_to_be32(HFSP_HARDLINK_TYPE); |
142 | file->user_info.fdFlags = cpu_to_be16(0x100); | 150 | file->user_info.fdCreator = |
143 | file->create_date = HFSPLUS_I(sbi->hidden_dir)->create_date; | 151 | cpu_to_be32(HFSP_HFSPLUS_CREATOR); |
144 | file->permissions.dev = cpu_to_be32(HFSPLUS_I(inode)->linkid); | 152 | file->user_info.fdFlags = |
153 | cpu_to_be16(0x100); | ||
154 | file->create_date = | ||
155 | HFSPLUS_I(sbi->hidden_dir)->create_date; | ||
156 | file->permissions.dev = | ||
157 | cpu_to_be32(HFSPLUS_I(inode)->linkid); | ||
145 | } | 158 | } |
146 | return sizeof(*file); | 159 | return sizeof(*file); |
147 | } | 160 | } |
@@ -182,12 +195,14 @@ int hfsplus_find_cat(struct super_block *sb, u32 cnid, | |||
182 | return -EIO; | 195 | return -EIO; |
183 | } | 196 | } |
184 | 197 | ||
185 | hfsplus_cat_build_key_uni(fd->search_key, be32_to_cpu(tmp.thread.parentID), | 198 | hfsplus_cat_build_key_uni(fd->search_key, |
186 | &tmp.thread.nodeName); | 199 | be32_to_cpu(tmp.thread.parentID), |
200 | &tmp.thread.nodeName); | ||
187 | return hfs_brec_find(fd); | 201 | return hfs_brec_find(fd); |
188 | } | 202 | } |
189 | 203 | ||
190 | int hfsplus_create_cat(u32 cnid, struct inode *dir, struct qstr *str, struct inode *inode) | 204 | int hfsplus_create_cat(u32 cnid, struct inode *dir, |
205 | struct qstr *str, struct inode *inode) | ||
191 | { | 206 | { |
192 | struct super_block *sb = dir->i_sb; | 207 | struct super_block *sb = dir->i_sb; |
193 | struct hfs_find_data fd; | 208 | struct hfs_find_data fd; |
@@ -195,13 +210,15 @@ int hfsplus_create_cat(u32 cnid, struct inode *dir, struct qstr *str, struct ino | |||
195 | int entry_size; | 210 | int entry_size; |
196 | int err; | 211 | int err; |
197 | 212 | ||
198 | dprint(DBG_CAT_MOD, "create_cat: %s,%u(%d)\n", str->name, cnid, inode->i_nlink); | 213 | dprint(DBG_CAT_MOD, "create_cat: %s,%u(%d)\n", |
214 | str->name, cnid, inode->i_nlink); | ||
199 | hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); | 215 | hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); |
200 | 216 | ||
201 | hfsplus_cat_build_key(sb, fd.search_key, cnid, NULL); | 217 | hfsplus_cat_build_key(sb, fd.search_key, cnid, NULL); |
202 | entry_size = hfsplus_fill_cat_thread(sb, &entry, S_ISDIR(inode->i_mode) ? | 218 | entry_size = hfsplus_fill_cat_thread(sb, &entry, |
219 | S_ISDIR(inode->i_mode) ? | ||
203 | HFSPLUS_FOLDER_THREAD : HFSPLUS_FILE_THREAD, | 220 | HFSPLUS_FOLDER_THREAD : HFSPLUS_FILE_THREAD, |
204 | dir->i_ino, str); | 221 | dir->i_ino, str); |
205 | err = hfs_brec_find(&fd); | 222 | err = hfs_brec_find(&fd); |
206 | if (err != -ENOENT) { | 223 | if (err != -ENOENT) { |
207 | if (!err) | 224 | if (!err) |
@@ -250,7 +267,8 @@ int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str) | |||
250 | int err, off; | 267 | int err, off; |
251 | u16 type; | 268 | u16 type; |
252 | 269 | ||
253 | dprint(DBG_CAT_MOD, "delete_cat: %s,%u\n", str ? str->name : NULL, cnid); | 270 | dprint(DBG_CAT_MOD, "delete_cat: %s,%u\n", |
271 | str ? str->name : NULL, cnid); | ||
254 | hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); | 272 | hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &fd); |
255 | 273 | ||
256 | if (!str) { | 274 | if (!str) { |
@@ -261,11 +279,15 @@ int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str) | |||
261 | if (err) | 279 | if (err) |
262 | goto out; | 280 | goto out; |
263 | 281 | ||
264 | off = fd.entryoffset + offsetof(struct hfsplus_cat_thread, nodeName); | 282 | off = fd.entryoffset + |
283 | offsetof(struct hfsplus_cat_thread, nodeName); | ||
265 | fd.search_key->cat.parent = cpu_to_be32(dir->i_ino); | 284 | fd.search_key->cat.parent = cpu_to_be32(dir->i_ino); |
266 | hfs_bnode_read(fd.bnode, &fd.search_key->cat.name.length, off, 2); | 285 | hfs_bnode_read(fd.bnode, |
286 | &fd.search_key->cat.name.length, off, 2); | ||
267 | len = be16_to_cpu(fd.search_key->cat.name.length) * 2; | 287 | len = be16_to_cpu(fd.search_key->cat.name.length) * 2; |
268 | hfs_bnode_read(fd.bnode, &fd.search_key->cat.name.unicode, off + 2, len); | 288 | hfs_bnode_read(fd.bnode, |
289 | &fd.search_key->cat.name.unicode, | ||
290 | off + 2, len); | ||
269 | fd.search_key->key_len = cpu_to_be16(6 + len); | 291 | fd.search_key->key_len = cpu_to_be16(6 + len); |
270 | } else | 292 | } else |
271 | hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, str); | 293 | hfsplus_cat_build_key(sb, fd.search_key, dir->i_ino, str); |
@@ -282,7 +304,8 @@ int hfsplus_delete_cat(u32 cnid, struct inode *dir, struct qstr *str) | |||
282 | hfsplus_free_fork(sb, cnid, &fork, HFSPLUS_TYPE_DATA); | 304 | hfsplus_free_fork(sb, cnid, &fork, HFSPLUS_TYPE_DATA); |
283 | #endif | 305 | #endif |
284 | 306 | ||
285 | off = fd.entryoffset + offsetof(struct hfsplus_cat_file, rsrc_fork); | 307 | off = fd.entryoffset + |
308 | offsetof(struct hfsplus_cat_file, rsrc_fork); | ||
286 | hfs_bnode_read(fd.bnode, &fork, off, sizeof(fork)); | 309 | hfs_bnode_read(fd.bnode, &fork, off, sizeof(fork)); |
287 | hfsplus_free_fork(sb, cnid, &fork, HFSPLUS_TYPE_RSRC); | 310 | hfsplus_free_fork(sb, cnid, &fork, HFSPLUS_TYPE_RSRC); |
288 | } | 311 | } |
@@ -326,7 +349,8 @@ int hfsplus_rename_cat(u32 cnid, | |||
326 | int entry_size, type; | 349 | int entry_size, type; |
327 | int err = 0; | 350 | int err = 0; |
328 | 351 | ||
329 | dprint(DBG_CAT_MOD, "rename_cat: %u - %lu,%s - %lu,%s\n", cnid, src_dir->i_ino, src_name->name, | 352 | dprint(DBG_CAT_MOD, "rename_cat: %u - %lu,%s - %lu,%s\n", |
353 | cnid, src_dir->i_ino, src_name->name, | ||
330 | dst_dir->i_ino, dst_name->name); | 354 | dst_dir->i_ino, dst_name->name); |
331 | hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &src_fd); | 355 | hfs_find_init(HFSPLUS_SB(sb)->cat_tree, &src_fd); |
332 | dst_fd = src_fd; | 356 | dst_fd = src_fd; |
@@ -378,7 +402,8 @@ int hfsplus_rename_cat(u32 cnid, | |||
378 | 402 | ||
379 | /* create new thread entry */ | 403 | /* create new thread entry */ |
380 | hfsplus_cat_build_key(sb, dst_fd.search_key, cnid, NULL); | 404 | hfsplus_cat_build_key(sb, dst_fd.search_key, cnid, NULL); |
381 | entry_size = hfsplus_fill_cat_thread(sb, &entry, type, dst_dir->i_ino, dst_name); | 405 | entry_size = hfsplus_fill_cat_thread(sb, &entry, type, |
406 | dst_dir->i_ino, dst_name); | ||
382 | err = hfs_brec_find(&dst_fd); | 407 | err = hfs_brec_find(&dst_fd); |
383 | if (err != -ENOENT) { | 408 | if (err != -ENOENT) { |
384 | if (!err) | 409 | if (!err) |