hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/fs/squashfs/squashfs_fs.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 #ifndef SQUASHFS_FS
23 #define SQUASHFS_FS
34 /*
....@@ -5,20 +6,6 @@
56 *
67 * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008
78 * Phillip Lougher <phillip@squashfs.org.uk>
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU General Public License
11
- * as published by the Free Software Foundation; either version 2,
12
- * or (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; if not, write to the Free Software
21
- * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
229 *
2310 * squashfs_fs.h
2411 */
....@@ -196,7 +183,7 @@
196183 #define SQUASHFS_ID_BLOCK_BYTES(A) (SQUASHFS_ID_BLOCKS(A) *\
197184 sizeof(u64))
198185 /* xattr id lookup table defines */
199
-#define SQUASHFS_XATTR_BYTES(A) ((A) * sizeof(struct squashfs_xattr_id))
186
+#define SQUASHFS_XATTR_BYTES(A) (((u64) (A)) * sizeof(struct squashfs_xattr_id))
200187
201188 #define SQUASHFS_XATTR_BLOCK(A) (SQUASHFS_XATTR_BYTES(A) / \
202189 SQUASHFS_METADATA_SIZE)
....@@ -276,7 +263,7 @@
276263 __le32 index;
277264 __le32 start_block;
278265 __le32 size;
279
- unsigned char name[0];
266
+ unsigned char name[];
280267 };
281268
282269 struct squashfs_base_inode {
....@@ -341,7 +328,7 @@
341328 __le32 inode_number;
342329 __le32 nlink;
343330 __le32 symlink_size;
344
- char symlink[0];
331
+ char symlink[];
345332 };
346333
347334 struct squashfs_reg_inode {
....@@ -355,7 +342,7 @@
355342 __le32 fragment;
356343 __le32 offset;
357344 __le32 file_size;
358
- __le16 block_list[0];
345
+ __le16 block_list[];
359346 };
360347
361348 struct squashfs_lreg_inode {
....@@ -372,7 +359,7 @@
372359 __le32 fragment;
373360 __le32 offset;
374361 __le32 xattr;
375
- __le16 block_list[0];
362
+ __le16 block_list[];
376363 };
377364
378365 struct squashfs_dir_inode {
....@@ -403,7 +390,7 @@
403390 __le16 i_count;
404391 __le16 offset;
405392 __le32 xattr;
406
- struct squashfs_dir_index index[0];
393
+ struct squashfs_dir_index index[];
407394 };
408395
409396 union squashfs_inode {
....@@ -424,7 +411,7 @@
424411 __le16 inode_number;
425412 __le16 type;
426413 __le16 size;
427
- char name[0];
414
+ char name[];
428415 };
429416
430417 struct squashfs_dir_header {
....@@ -442,12 +429,12 @@
442429 struct squashfs_xattr_entry {
443430 __le16 type;
444431 __le16 size;
445
- char data[0];
432
+ char data[];
446433 };
447434
448435 struct squashfs_xattr_val {
449436 __le32 vsize;
450
- char value[0];
437
+ char value[];
451438 };
452439
453440 struct squashfs_xattr_id {