| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
|---|
| 1 | 2 | #ifndef SQUASHFS_FS |
|---|
| 2 | 3 | #define SQUASHFS_FS |
|---|
| 3 | 4 | /* |
|---|
| .. | .. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
|---|
| 7 | 8 | * 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. |
|---|
| 22 | 9 | * |
|---|
| 23 | 10 | * squashfs_fs.h |
|---|
| 24 | 11 | */ |
|---|
| .. | .. |
|---|
| 276 | 263 | __le32 index; |
|---|
| 277 | 264 | __le32 start_block; |
|---|
| 278 | 265 | __le32 size; |
|---|
| 279 | | - unsigned char name[0]; |
|---|
| 266 | + unsigned char name[]; |
|---|
| 280 | 267 | }; |
|---|
| 281 | 268 | |
|---|
| 282 | 269 | struct squashfs_base_inode { |
|---|
| .. | .. |
|---|
| 341 | 328 | __le32 inode_number; |
|---|
| 342 | 329 | __le32 nlink; |
|---|
| 343 | 330 | __le32 symlink_size; |
|---|
| 344 | | - char symlink[0]; |
|---|
| 331 | + char symlink[]; |
|---|
| 345 | 332 | }; |
|---|
| 346 | 333 | |
|---|
| 347 | 334 | struct squashfs_reg_inode { |
|---|
| .. | .. |
|---|
| 355 | 342 | __le32 fragment; |
|---|
| 356 | 343 | __le32 offset; |
|---|
| 357 | 344 | __le32 file_size; |
|---|
| 358 | | - __le16 block_list[0]; |
|---|
| 345 | + __le16 block_list[]; |
|---|
| 359 | 346 | }; |
|---|
| 360 | 347 | |
|---|
| 361 | 348 | struct squashfs_lreg_inode { |
|---|
| .. | .. |
|---|
| 372 | 359 | __le32 fragment; |
|---|
| 373 | 360 | __le32 offset; |
|---|
| 374 | 361 | __le32 xattr; |
|---|
| 375 | | - __le16 block_list[0]; |
|---|
| 362 | + __le16 block_list[]; |
|---|
| 376 | 363 | }; |
|---|
| 377 | 364 | |
|---|
| 378 | 365 | struct squashfs_dir_inode { |
|---|
| .. | .. |
|---|
| 403 | 390 | __le16 i_count; |
|---|
| 404 | 391 | __le16 offset; |
|---|
| 405 | 392 | __le32 xattr; |
|---|
| 406 | | - struct squashfs_dir_index index[0]; |
|---|
| 393 | + struct squashfs_dir_index index[]; |
|---|
| 407 | 394 | }; |
|---|
| 408 | 395 | |
|---|
| 409 | 396 | union squashfs_inode { |
|---|
| .. | .. |
|---|
| 424 | 411 | __le16 inode_number; |
|---|
| 425 | 412 | __le16 type; |
|---|
| 426 | 413 | __le16 size; |
|---|
| 427 | | - char name[0]; |
|---|
| 414 | + char name[]; |
|---|
| 428 | 415 | }; |
|---|
| 429 | 416 | |
|---|
| 430 | 417 | struct squashfs_dir_header { |
|---|
| .. | .. |
|---|
| 442 | 429 | struct squashfs_xattr_entry { |
|---|
| 443 | 430 | __le16 type; |
|---|
| 444 | 431 | __le16 size; |
|---|
| 445 | | - char data[0]; |
|---|
| 432 | + char data[]; |
|---|
| 446 | 433 | }; |
|---|
| 447 | 434 | |
|---|
| 448 | 435 | struct squashfs_xattr_val { |
|---|
| 449 | 436 | __le32 vsize; |
|---|
| 450 | | - char value[0]; |
|---|
| 437 | + char value[]; |
|---|
| 451 | 438 | }; |
|---|
| 452 | 439 | |
|---|
| 453 | 440 | struct squashfs_xattr_id { |
|---|