diff options
| -rw-r--r-- | TODO_config_nommu | 11 | ||||
| -rw-r--r-- | e2fsprogs/Config.in | 59 | ||||
| -rw-r--r-- | scripts/defconfig | 11 | ||||
| -rw-r--r-- | util-linux/Config.in | 166 | ||||
| -rw-r--r-- | util-linux/volume_id/Kbuild | 23 | ||||
| -rw-r--r-- | util-linux/volume_id/get_devname.c | 30 | ||||
| -rw-r--r-- | util-linux/volume_id/ocfs2.c | 2 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_highpoint.c (renamed from util-linux/volume_id/highpoint.c) | 0 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_hpfs.c (renamed from util-linux/volume_id/hpfs.c) | 0 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_isw_raid.c (renamed from util-linux/volume_id/isw_raid.c) | 0 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_lsi_raid.c (renamed from util-linux/volume_id/lsi_raid.c) | 0 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_lvm.c (renamed from util-linux/volume_id/lvm.c) | 7 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_mac.c (renamed from util-linux/volume_id/mac.c) | 50 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_minix.c (renamed from util-linux/volume_id/minix.c) | 0 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_msdos.c (renamed from util-linux/volume_id/msdos.c) | 53 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_nvidia_raid.c (renamed from util-linux/volume_id/nvidia_raid.c) | 0 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_promise_raid.c (renamed from util-linux/volume_id/promise_raid.c) | 0 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_silicon_raid.c (renamed from util-linux/volume_id/silicon_raid.c) | 0 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_ufs.c (renamed from util-linux/volume_id/ufs.c) | 0 | ||||
| -rw-r--r-- | util-linux/volume_id/unused_via_raid.c (renamed from util-linux/volume_id/via_raid.c) | 2 | ||||
| -rw-r--r-- | util-linux/volume_id/volume_id.c | 32 | ||||
| -rw-r--r-- | util-linux/volume_id/volume_id_internal.h | 26 |
22 files changed, 234 insertions, 238 deletions
diff --git a/TODO_config_nommu b/TODO_config_nommu index e62856875..21960a0a4 100644 --- a/TODO_config_nommu +++ b/TODO_config_nommu | |||
| @@ -497,27 +497,16 @@ CONFIG_FEATURE_VOLUMEID_REISERFS=y | |||
| 497 | CONFIG_FEATURE_VOLUMEID_FAT=y | 497 | CONFIG_FEATURE_VOLUMEID_FAT=y |
| 498 | CONFIG_FEATURE_VOLUMEID_HFS=y | 498 | CONFIG_FEATURE_VOLUMEID_HFS=y |
| 499 | CONFIG_FEATURE_VOLUMEID_JFS=y | 499 | CONFIG_FEATURE_VOLUMEID_JFS=y |
| 500 | CONFIG_FEATURE_VOLUMEID_UFS=y | ||
| 501 | CONFIG_FEATURE_VOLUMEID_XFS=y | 500 | CONFIG_FEATURE_VOLUMEID_XFS=y |
| 502 | CONFIG_FEATURE_VOLUMEID_NTFS=y | 501 | CONFIG_FEATURE_VOLUMEID_NTFS=y |
| 503 | CONFIG_FEATURE_VOLUMEID_ISO9660=y | 502 | CONFIG_FEATURE_VOLUMEID_ISO9660=y |
| 504 | CONFIG_FEATURE_VOLUMEID_UDF=y | 503 | CONFIG_FEATURE_VOLUMEID_UDF=y |
| 505 | CONFIG_FEATURE_VOLUMEID_LUKS=y | 504 | CONFIG_FEATURE_VOLUMEID_LUKS=y |
| 506 | CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y | 505 | CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y |
| 507 | CONFIG_FEATURE_VOLUMEID_LVM=y | ||
| 508 | CONFIG_FEATURE_VOLUMEID_CRAMFS=y | 506 | CONFIG_FEATURE_VOLUMEID_CRAMFS=y |
| 509 | CONFIG_FEATURE_VOLUMEID_HPFS=y | ||
| 510 | CONFIG_FEATURE_VOLUMEID_ROMFS=y | 507 | CONFIG_FEATURE_VOLUMEID_ROMFS=y |
| 511 | CONFIG_FEATURE_VOLUMEID_SYSV=y | 508 | CONFIG_FEATURE_VOLUMEID_SYSV=y |
| 512 | CONFIG_FEATURE_VOLUMEID_MINIX=y | ||
| 513 | CONFIG_FEATURE_VOLUMEID_OCFS2=y | 509 | CONFIG_FEATURE_VOLUMEID_OCFS2=y |
| 514 | CONFIG_FEATURE_VOLUMEID_HIGHPOINTRAID=y | ||
| 515 | CONFIG_FEATURE_VOLUMEID_ISWRAID=y | ||
| 516 | CONFIG_FEATURE_VOLUMEID_LSIRAID=y | ||
| 517 | CONFIG_FEATURE_VOLUMEID_VIARAID=y | ||
| 518 | CONFIG_FEATURE_VOLUMEID_SILICONRAID=y | ||
| 519 | CONFIG_FEATURE_VOLUMEID_NVIDIARAID=y | ||
| 520 | CONFIG_FEATURE_VOLUMEID_PROMISERAID=y | ||
| 521 | CONFIG_FEATURE_VOLUMEID_LINUXRAID=y | 510 | CONFIG_FEATURE_VOLUMEID_LINUXRAID=y |
| 522 | CONFIG_MOUNT=y | 511 | CONFIG_MOUNT=y |
| 523 | CONFIG_FEATURE_MOUNT_FAKE=y | 512 | CONFIG_FEATURE_MOUNT_FAKE=y |
diff --git a/e2fsprogs/Config.in b/e2fsprogs/Config.in index 521273e45..fe8d03150 100644 --- a/e2fsprogs/Config.in +++ b/e2fsprogs/Config.in | |||
| @@ -12,13 +12,13 @@ config CHATTR | |||
| 12 | chattr changes the file attributes on a second extended file system. | 12 | chattr changes the file attributes on a second extended file system. |
| 13 | 13 | ||
| 14 | ### config E2FSCK | 14 | ### config E2FSCK |
| 15 | ### bool "e2fsck" | 15 | ### bool "e2fsck" |
| 16 | ### default n | 16 | ### default n |
| 17 | ### help | 17 | ### help |
| 18 | ### e2fsck is used to check Linux second extended file systems (ext2fs). | 18 | ### e2fsck is used to check Linux second extended file systems (ext2fs). |
| 19 | ### e2fsck also supports ext2 filesystems countaining a journal (ext3). | 19 | ### e2fsck also supports ext2 filesystems countaining a journal (ext3). |
| 20 | ### The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also | 20 | ### The normal compat symlinks 'fsck.ext2' and 'fsck.ext3' are also |
| 21 | ### provided. | 21 | ### provided. |
| 22 | 22 | ||
| 23 | config FSCK | 23 | config FSCK |
| 24 | bool "fsck" | 24 | bool "fsck" |
| @@ -35,33 +35,34 @@ config LSATTR | |||
| 35 | lsattr lists the file attributes on a second extended file system. | 35 | lsattr lists the file attributes on a second extended file system. |
| 36 | 36 | ||
| 37 | ### config MKE2FS | 37 | ### config MKE2FS |
| 38 | ### bool "mke2fs" | 38 | ### bool "mke2fs" |
| 39 | ### default n | 39 | ### default n |
| 40 | ### help | 40 | ### help |
| 41 | ### mke2fs is used to create an ext2/ext3 filesystem. The normal compat | 41 | ### mke2fs is used to create an ext2/ext3 filesystem. The normal compat |
| 42 | ### symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided. | 42 | ### symlinks 'mkfs.ext2' and 'mkfs.ext3' are also provided. |
| 43 | 43 | ||
| 44 | ### config TUNE2FS | 44 | ### config TUNE2FS |
| 45 | ### bool "tune2fs" | 45 | ### bool "tune2fs" |
| 46 | ### default n | 46 | ### default n |
| 47 | ### help | 47 | ### help |
| 48 | ### tune2fs allows the system administrator to adjust various tunable | 48 | ### tune2fs allows the system administrator to adjust various tunable |
| 49 | ### filesystem parameters on Linux ext2/ext3 filesystems. | 49 | ### filesystem parameters on Linux ext2/ext3 filesystems. |
| 50 | 50 | ||
| 51 | ### config E2LABEL | 51 | ### config E2LABEL |
| 52 | ### bool "e2label" | 52 | ### bool "e2label" |
| 53 | ### default n | 53 | ### default n |
| 54 | ### depends on TUNE2FS | 54 | ### depends on TUNE2FS |
| 55 | ### help | 55 | ### help |
| 56 | ### e2label will display or change the filesystem label on the ext2 | 56 | ### e2label will display or change the filesystem label on the ext2 |
| 57 | ### filesystem located on device. | 57 | ### filesystem located on device. |
| 58 | 58 | ||
| 59 | ### NB: this one is now provided by util-linux/volume_id/* | ||
| 59 | ### config FINDFS | 60 | ### config FINDFS |
| 60 | ### bool "findfs" | 61 | ### bool "findfs" |
| 61 | ### default n | 62 | ### default n |
| 62 | ### depends on TUNE2FS | 63 | ### depends on TUNE2FS |
| 63 | ### help | 64 | ### help |
| 64 | ### findfs will search the disks in the system looking for a filesystem | 65 | ### findfs will search the disks in the system looking for a filesystem |
| 65 | ### which has a label matching label or a UUID equal to uuid. | 66 | ### which has a label matching label or a UUID equal to uuid. |
| 66 | 67 | ||
| 67 | endmenu | 68 | endmenu |
diff --git a/scripts/defconfig b/scripts/defconfig index 6dbe5d146..6d9997eb0 100644 --- a/scripts/defconfig +++ b/scripts/defconfig | |||
| @@ -493,27 +493,16 @@ CONFIG_FEATURE_USE_TERMIOS=y | |||
| 493 | # CONFIG_FEATURE_VOLUMEID_FAT is not set | 493 | # CONFIG_FEATURE_VOLUMEID_FAT is not set |
| 494 | # CONFIG_FEATURE_VOLUMEID_HFS is not set | 494 | # CONFIG_FEATURE_VOLUMEID_HFS is not set |
| 495 | # CONFIG_FEATURE_VOLUMEID_JFS is not set | 495 | # CONFIG_FEATURE_VOLUMEID_JFS is not set |
| 496 | # CONFIG_FEATURE_VOLUMEID_UFS is not set | ||
| 497 | # CONFIG_FEATURE_VOLUMEID_XFS is not set | 496 | # CONFIG_FEATURE_VOLUMEID_XFS is not set |
| 498 | # CONFIG_FEATURE_VOLUMEID_NTFS is not set | 497 | # CONFIG_FEATURE_VOLUMEID_NTFS is not set |
| 499 | # CONFIG_FEATURE_VOLUMEID_ISO9660 is not set | 498 | # CONFIG_FEATURE_VOLUMEID_ISO9660 is not set |
| 500 | # CONFIG_FEATURE_VOLUMEID_UDF is not set | 499 | # CONFIG_FEATURE_VOLUMEID_UDF is not set |
| 501 | # CONFIG_FEATURE_VOLUMEID_LUKS is not set | 500 | # CONFIG_FEATURE_VOLUMEID_LUKS is not set |
| 502 | # CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set | 501 | # CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set |
| 503 | # CONFIG_FEATURE_VOLUMEID_LVM is not set | ||
| 504 | # CONFIG_FEATURE_VOLUMEID_CRAMFS is not set | 502 | # CONFIG_FEATURE_VOLUMEID_CRAMFS is not set |
| 505 | # CONFIG_FEATURE_VOLUMEID_HPFS is not set | ||
| 506 | # CONFIG_FEATURE_VOLUMEID_ROMFS is not set | 503 | # CONFIG_FEATURE_VOLUMEID_ROMFS is not set |
| 507 | # CONFIG_FEATURE_VOLUMEID_SYSV is not set | 504 | # CONFIG_FEATURE_VOLUMEID_SYSV is not set |
| 508 | # CONFIG_FEATURE_VOLUMEID_MINIX is not set | ||
| 509 | # CONFIG_FEATURE_VOLUMEID_OCFS2 is not set | 505 | # CONFIG_FEATURE_VOLUMEID_OCFS2 is not set |
| 510 | # CONFIG_FEATURE_VOLUMEID_HIGHPOINTRAID is not set | ||
| 511 | # CONFIG_FEATURE_VOLUMEID_ISWRAID is not set | ||
| 512 | # CONFIG_FEATURE_VOLUMEID_LSIRAID is not set | ||
| 513 | # CONFIG_FEATURE_VOLUMEID_VIARAID is not set | ||
| 514 | # CONFIG_FEATURE_VOLUMEID_SILICONRAID is not set | ||
| 515 | # CONFIG_FEATURE_VOLUMEID_NVIDIARAID is not set | ||
| 516 | # CONFIG_FEATURE_VOLUMEID_PROMISERAID is not set | ||
| 517 | # CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set | 506 | # CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set |
| 518 | CONFIG_MOUNT=y | 507 | CONFIG_MOUNT=y |
| 519 | CONFIG_FEATURE_MOUNT_FAKE=y | 508 | CONFIG_FEATURE_MOUNT_FAKE=y |
diff --git a/util-linux/Config.in b/util-linux/Config.in index a1e843a3d..1c3fe88ee 100644 --- a/util-linux/Config.in +++ b/util-linux/Config.in | |||
| @@ -159,7 +159,7 @@ config FINDFS | |||
| 159 | package. However, the e2fsprogs version only support ext2/3. This | 159 | package. However, the e2fsprogs version only support ext2/3. This |
| 160 | version supports those in addition to FAT, swap, and ReiserFS. | 160 | version supports those in addition to FAT, swap, and ReiserFS. |
| 161 | WARNING: | 161 | WARNING: |
| 162 | With all submodules selected, it will add ~9k to busybox. | 162 | With all submodules selected, it will add ~8k to busybox. |
| 163 | 163 | ||
| 164 | config FREERAMDISK | 164 | config FREERAMDISK |
| 165 | bool "freeramdisk" | 165 | bool "freeramdisk" |
| @@ -427,12 +427,12 @@ config FEATURE_VOLUMEID_JFS | |||
| 427 | help | 427 | help |
| 428 | TODO | 428 | TODO |
| 429 | 429 | ||
| 430 | config FEATURE_VOLUMEID_UFS | 430 | ### config FEATURE_VOLUMEID_UFS |
| 431 | bool "ufs filesystem" | 431 | ### bool "ufs filesystem" |
| 432 | default n | 432 | ### default n |
| 433 | depends on VOLUMEID | 433 | ### depends on VOLUMEID |
| 434 | help | 434 | ### help |
| 435 | TODO | 435 | ### TODO |
| 436 | 436 | ||
| 437 | config FEATURE_VOLUMEID_XFS | 437 | config FEATURE_VOLUMEID_XFS |
| 438 | bool "xfs filesystem" | 438 | bool "xfs filesystem" |
| @@ -476,12 +476,12 @@ config FEATURE_VOLUMEID_LINUXSWAP | |||
| 476 | help | 476 | help |
| 477 | TODO | 477 | TODO |
| 478 | 478 | ||
| 479 | config FEATURE_VOLUMEID_LVM | 479 | ### config FEATURE_VOLUMEID_LVM |
| 480 | bool "lvm" | 480 | ### bool "lvm" |
| 481 | default n | 481 | ### default n |
| 482 | depends on VOLUMEID | 482 | ### depends on VOLUMEID |
| 483 | help | 483 | ### help |
| 484 | TODO | 484 | ### TODO |
| 485 | 485 | ||
| 486 | config FEATURE_VOLUMEID_CRAMFS | 486 | config FEATURE_VOLUMEID_CRAMFS |
| 487 | bool "cramfs filesystem" | 487 | bool "cramfs filesystem" |
| @@ -490,12 +490,12 @@ config FEATURE_VOLUMEID_CRAMFS | |||
| 490 | help | 490 | help |
| 491 | TODO | 491 | TODO |
| 492 | 492 | ||
| 493 | config FEATURE_VOLUMEID_HPFS | 493 | ### config FEATURE_VOLUMEID_HPFS |
| 494 | bool "hpfs filesystem" | 494 | ### bool "hpfs filesystem" |
| 495 | default n | 495 | ### default n |
| 496 | depends on VOLUMEID | 496 | ### depends on VOLUMEID |
| 497 | help | 497 | ### help |
| 498 | TODO | 498 | ### TODO |
| 499 | 499 | ||
| 500 | config FEATURE_VOLUMEID_ROMFS | 500 | config FEATURE_VOLUMEID_ROMFS |
| 501 | bool "romfs filesystem" | 501 | bool "romfs filesystem" |
| @@ -511,27 +511,27 @@ config FEATURE_VOLUMEID_SYSV | |||
| 511 | help | 511 | help |
| 512 | TODO | 512 | TODO |
| 513 | 513 | ||
| 514 | config FEATURE_VOLUMEID_MINIX | 514 | ### config FEATURE_VOLUMEID_MINIX |
| 515 | bool "minix filesystem" | 515 | ### bool "minix filesystem" |
| 516 | default n | 516 | ### default n |
| 517 | depends on VOLUMEID | 517 | ### depends on VOLUMEID |
| 518 | help | 518 | ### help |
| 519 | TODO | 519 | ### TODO |
| 520 | 520 | ||
| 521 | ### These only detect partition tables - not used (yet?) | 521 | ### These only detect partition tables - not used (yet?) |
| 522 | ### config FEATURE_VOLUMEID_MAC | 522 | ### config FEATURE_VOLUMEID_MAC |
| 523 | ### bool "mac filesystem" | 523 | ### bool "mac filesystem" |
| 524 | ### default n | 524 | ### default n |
| 525 | ### depends on VOLUMEID | 525 | ### depends on VOLUMEID |
| 526 | ### help | 526 | ### help |
| 527 | ### TODO | 527 | ### TODO |
| 528 | ### | 528 | ### |
| 529 | ### config FEATURE_VOLUMEID_MSDOS | 529 | ### config FEATURE_VOLUMEID_MSDOS |
| 530 | ### bool "msdos filesystem" | 530 | ### bool "msdos filesystem" |
| 531 | ### default n | 531 | ### default n |
| 532 | ### depends on VOLUMEID | 532 | ### depends on VOLUMEID |
| 533 | ### help | 533 | ### help |
| 534 | ### TODO | 534 | ### TODO |
| 535 | 535 | ||
| 536 | config FEATURE_VOLUMEID_OCFS2 | 536 | config FEATURE_VOLUMEID_OCFS2 |
| 537 | bool "ocfs2 filesystem" | 537 | bool "ocfs2 filesystem" |
| @@ -540,54 +540,54 @@ config FEATURE_VOLUMEID_OCFS2 | |||
| 540 | help | 540 | help |
| 541 | TODO | 541 | TODO |
| 542 | 542 | ||
| 543 | config FEATURE_VOLUMEID_HIGHPOINTRAID | 543 | ### config FEATURE_VOLUMEID_HIGHPOINTRAID |
| 544 | bool "highpoint raid" | 544 | ### bool "highpoint raid" |
| 545 | default n | 545 | ### default n |
| 546 | depends on VOLUMEID | 546 | ### depends on VOLUMEID |
| 547 | help | 547 | ### help |
| 548 | TODO | 548 | ### TODO |
| 549 | 549 | ||
| 550 | config FEATURE_VOLUMEID_ISWRAID | 550 | ### config FEATURE_VOLUMEID_ISWRAID |
| 551 | bool "intel raid" | 551 | ### bool "intel raid" |
| 552 | default n | 552 | ### default n |
| 553 | depends on VOLUMEID | 553 | ### depends on VOLUMEID |
| 554 | help | 554 | ### help |
| 555 | TODO | 555 | ### TODO |
| 556 | 556 | ||
| 557 | config FEATURE_VOLUMEID_LSIRAID | 557 | ### config FEATURE_VOLUMEID_LSIRAID |
| 558 | bool "lsi raid" | 558 | ### bool "lsi raid" |
| 559 | default n | 559 | ### default n |
| 560 | depends on VOLUMEID | 560 | ### depends on VOLUMEID |
| 561 | help | 561 | ### help |
| 562 | TODO | 562 | ### TODO |
| 563 | 563 | ||
| 564 | config FEATURE_VOLUMEID_VIARAID | 564 | ### config FEATURE_VOLUMEID_VIARAID |
| 565 | bool "via raid" | 565 | ### bool "via raid" |
| 566 | default n | 566 | ### default n |
| 567 | depends on VOLUMEID | 567 | ### depends on VOLUMEID |
| 568 | help | 568 | ### help |
| 569 | TODO | 569 | ### TODO |
| 570 | 570 | ||
| 571 | config FEATURE_VOLUMEID_SILICONRAID | 571 | ### config FEATURE_VOLUMEID_SILICONRAID |
| 572 | bool "silicon raid" | 572 | ### bool "silicon raid" |
| 573 | default n | 573 | ### default n |
| 574 | depends on VOLUMEID | 574 | ### depends on VOLUMEID |
| 575 | help | 575 | ### help |
| 576 | TODO | 576 | ### TODO |
| 577 | 577 | ||
| 578 | config FEATURE_VOLUMEID_NVIDIARAID | 578 | ### config FEATURE_VOLUMEID_NVIDIARAID |
| 579 | bool "nvidia raid" | 579 | ### bool "nvidia raid" |
| 580 | default n | 580 | ### default n |
| 581 | depends on VOLUMEID | 581 | ### depends on VOLUMEID |
| 582 | help | 582 | ### help |
| 583 | TODO | 583 | ### TODO |
| 584 | 584 | ||
| 585 | config FEATURE_VOLUMEID_PROMISERAID | 585 | ### config FEATURE_VOLUMEID_PROMISERAID |
| 586 | bool "promise raid" | 586 | ### bool "promise raid" |
| 587 | default n | 587 | ### default n |
| 588 | depends on VOLUMEID | 588 | ### depends on VOLUMEID |
| 589 | help | 589 | ### help |
| 590 | TODO | 590 | ### TODO |
| 591 | 591 | ||
| 592 | config FEATURE_VOLUMEID_LINUXRAID | 592 | config FEATURE_VOLUMEID_LINUXRAID |
| 593 | bool "linuxraid" | 593 | bool "linuxraid" |
diff --git a/util-linux/volume_id/Kbuild b/util-linux/volume_id/Kbuild index 96cd8807b..54b95f0c7 100644 --- a/util-linux/volume_id/Kbuild +++ b/util-linux/volume_id/Kbuild | |||
| @@ -13,30 +13,29 @@ lib-$(CONFIG_VOLUMEID) += volume_id.o util.o | |||
| 13 | lib-$(CONFIG_FEATURE_VOLUMEID_EXT) += ext.o | 13 | lib-$(CONFIG_FEATURE_VOLUMEID_EXT) += ext.o |
| 14 | lib-$(CONFIG_FEATURE_VOLUMEID_FAT) += fat.o | 14 | lib-$(CONFIG_FEATURE_VOLUMEID_FAT) += fat.o |
| 15 | lib-$(CONFIG_FEATURE_VOLUMEID_HFS) += hfs.o | 15 | lib-$(CONFIG_FEATURE_VOLUMEID_HFS) += hfs.o |
| 16 | lib-$(CONFIG_FEATURE_VOLUMEID_HIGHPOINTRAID) += highpoint.o | 16 | ### lib-$(CONFIG_FEATURE_VOLUMEID_HIGHPOINTRAID) += highpoint.o |
| 17 | lib-$(CONFIG_FEATURE_VOLUMEID_ISWRAID) += isw_raid.o | 17 | ### lib-$(CONFIG_FEATURE_VOLUMEID_ISWRAID) += isw_raid.o |
| 18 | lib-$(CONFIG_FEATURE_VOLUMEID_LSIRAID) += lsi_raid.o | 18 | ### lib-$(CONFIG_FEATURE_VOLUMEID_LSIRAID) += lsi_raid.o |
| 19 | lib-$(CONFIG_FEATURE_VOLUMEID_VIARAID) += via_raid.o | 19 | ### lib-$(CONFIG_FEATURE_VOLUMEID_VIARAID) += via_raid.o |
| 20 | lib-$(CONFIG_FEATURE_VOLUMEID_SILICONRAID) += silicon_raid.o | 20 | ### lib-$(CONFIG_FEATURE_VOLUMEID_SILICONRAID) += silicon_raid.o |
| 21 | lib-$(CONFIG_FEATURE_VOLUMEID_NVIDIARAID) += nvidia_raid.o | 21 | ### lib-$(CONFIG_FEATURE_VOLUMEID_NVIDIARAID) += nvidia_raid.o |
| 22 | lib-$(CONFIG_FEATURE_VOLUMEID_PROMISERAID) += promise_raid.o | 22 | ### lib-$(CONFIG_FEATURE_VOLUMEID_PROMISERAID) += promise_raid.o |
| 23 | lib-$(CONFIG_FEATURE_VOLUMEID_ISO9660) += iso9660.o | 23 | lib-$(CONFIG_FEATURE_VOLUMEID_ISO9660) += iso9660.o |
| 24 | lib-$(CONFIG_FEATURE_VOLUMEID_JFS) += jfs.o | 24 | lib-$(CONFIG_FEATURE_VOLUMEID_JFS) += jfs.o |
| 25 | lib-$(CONFIG_FEATURE_VOLUMEID_LINUXRAID) += linux_raid.o | 25 | lib-$(CONFIG_FEATURE_VOLUMEID_LINUXRAID) += linux_raid.o |
| 26 | lib-$(CONFIG_FEATURE_VOLUMEID_LINUXSWAP) += linux_swap.o | 26 | lib-$(CONFIG_FEATURE_VOLUMEID_LINUXSWAP) += linux_swap.o |
| 27 | lib-$(CONFIG_FEATURE_VOLUMEID_LVM) += lvm.o | 27 | ### lib-$(CONFIG_FEATURE_VOLUMEID_LVM) += lvm.o |
| 28 | ### unused | ||
| 29 | ### lib-$(CONFIG_FEATURE_VOLUMEID_MAC) += mac.o | 28 | ### lib-$(CONFIG_FEATURE_VOLUMEID_MAC) += mac.o |
| 30 | ### lib-$(CONFIG_FEATURE_VOLUMEID_MSDOS) += msdos.o | 29 | ### lib-$(CONFIG_FEATURE_VOLUMEID_MSDOS) += msdos.o |
| 31 | lib-$(CONFIG_FEATURE_VOLUMEID_NTFS) += ntfs.o | 30 | lib-$(CONFIG_FEATURE_VOLUMEID_NTFS) += ntfs.o |
| 32 | lib-$(CONFIG_FEATURE_VOLUMEID_REISERFS) += reiserfs.o | 31 | lib-$(CONFIG_FEATURE_VOLUMEID_REISERFS) += reiserfs.o |
| 33 | lib-$(CONFIG_FEATURE_VOLUMEID_UDF) += udf.o | 32 | lib-$(CONFIG_FEATURE_VOLUMEID_UDF) += udf.o |
| 34 | lib-$(CONFIG_FEATURE_VOLUMEID_UFS) += ufs.o | 33 | ### lib-$(CONFIG_FEATURE_VOLUMEID_UFS) += ufs.o |
| 35 | lib-$(CONFIG_FEATURE_VOLUMEID_XFS) += xfs.o | 34 | lib-$(CONFIG_FEATURE_VOLUMEID_XFS) += xfs.o |
| 36 | lib-$(CONFIG_FEATURE_VOLUMEID_CRAMFS) += cramfs.o | 35 | lib-$(CONFIG_FEATURE_VOLUMEID_CRAMFS) += cramfs.o |
| 37 | lib-$(CONFIG_FEATURE_VOLUMEID_HPFS) += hpfs.o | 36 | ### lib-$(CONFIG_FEATURE_VOLUMEID_HPFS) += hpfs.o |
| 38 | lib-$(CONFIG_FEATURE_VOLUMEID_ROMFS) += romfs.o | 37 | lib-$(CONFIG_FEATURE_VOLUMEID_ROMFS) += romfs.o |
| 39 | lib-$(CONFIG_FEATURE_VOLUMEID_SYSV) += sysv.o | 38 | lib-$(CONFIG_FEATURE_VOLUMEID_SYSV) += sysv.o |
| 40 | lib-$(CONFIG_FEATURE_VOLUMEID_MINIX) += minix.o | 39 | ### lib-$(CONFIG_FEATURE_VOLUMEID_MINIX) += minix.o |
| 41 | lib-$(CONFIG_FEATURE_VOLUMEID_LUKS) += luks.o | 40 | lib-$(CONFIG_FEATURE_VOLUMEID_LUKS) += luks.o |
| 42 | lib-$(CONFIG_FEATURE_VOLUMEID_OCFS2) += ocfs2.o | 41 | lib-$(CONFIG_FEATURE_VOLUMEID_OCFS2) += ocfs2.o |
diff --git a/util-linux/volume_id/get_devname.c b/util-linux/volume_id/get_devname.c index bb3043cd6..b46aad4a2 100644 --- a/util-linux/volume_id/get_devname.c +++ b/util-linux/volume_id/get_devname.c | |||
| @@ -243,8 +243,8 @@ dev_get_major_minor(char *device_name, int *major, int *minor) | |||
| 243 | colon = strchr(dev, ':'); | 243 | colon = strchr(dev, ':'); |
| 244 | if (!colon) | 244 | if (!colon) |
| 245 | goto ret; | 245 | goto ret; |
| 246 | *major = strtol(dev, NULL, 10); | 246 | *major = bb_strtou(dev, NULL, 10); |
| 247 | *minor = strtol(colon + 1, NULL, 10); | 247 | *minor = bb_strtou(colon + 1, NULL, 10); |
| 248 | 248 | ||
| 249 | ret: | 249 | ret: |
| 250 | free(dev_path); | 250 | free(dev_path); |
| @@ -261,27 +261,28 @@ uuidcache_init_cdroms(void) | |||
| 261 | 261 | ||
| 262 | proccd = fopen(PROC_CDROMS, "r"); | 262 | proccd = fopen(PROC_CDROMS, "r"); |
| 263 | if (!proccd) { | 263 | if (!proccd) { |
| 264 | static smallint warn = 0; | 264 | // static smallint warn = 0; |
| 265 | if (!warn) { | 265 | // if (!warn) { |
| 266 | warn = 1; | 266 | // warn = 1; |
| 267 | bb_error_msg("mount: could not open %s, so UUID and LABEL " | 267 | // bb_error_msg("can't open %s, UUID and LABEL " |
| 268 | "conversion cannot be done for CD-Roms.", | 268 | // "conversion cannot be done for CD-Roms", |
| 269 | PROC_CDROMS); | 269 | // PROC_CDROMS); |
| 270 | } | 270 | // } |
| 271 | return; | 271 | return; |
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | while (fgets(line, sizeof(line), proccd)) { | 274 | while (fgets(line, sizeof(line), proccd)) { |
| 275 | static const char drive_name_string[] ALIGN1 = "drive name:\t\t"; | 275 | static const char drive_name_string[] ALIGN1 = "drive name:"; |
| 276 | 276 | ||
| 277 | if (strncmp(line, drive_name_string, sizeof(drive_name_string) - 1) == 0) { | 277 | if (strncmp(line, drive_name_string, sizeof(drive_name_string) - 1) == 0) { |
| 278 | char *device_name; | 278 | char *device_name; |
| 279 | device_name = strtok(line + sizeof(drive_name_string) - 1, "\t\n"); | 279 | |
| 280 | while (device_name) { | 280 | device_name = strtok(skip_whitespace(line + sizeof(drive_name_string) - 1), " \t\n"); |
| 281 | while (device_name && device_name[0]) { | ||
| 281 | ma = mi = -1; | 282 | ma = mi = -1; |
| 282 | dev_get_major_minor(device_name, &ma, &mi); | 283 | dev_get_major_minor(device_name, &ma, &mi); |
| 283 | uuidcache_check_device(device_name, ma, mi, 1); | 284 | uuidcache_check_device(device_name, ma, mi, 1); |
| 284 | device_name = strtok(NULL, "\t\n"); | 285 | device_name = strtok(NULL, " \t\n"); |
| 285 | } | 286 | } |
| 286 | break; | 287 | break; |
| 287 | } | 288 | } |
| @@ -418,7 +419,8 @@ char *get_devname_from_uuid(const char *spec) | |||
| 418 | uuidcache_init(); | 419 | uuidcache_init(); |
| 419 | uc = uuidCache; | 420 | uc = uuidCache; |
| 420 | while (uc) { | 421 | while (uc) { |
| 421 | if (strcmp(spec, uc->uc_uuid) == 0) { | 422 | /* case of hex numbers doesn't matter */ |
| 423 | if (strcasecmp(spec, uc->uc_uuid) == 0) { | ||
| 422 | return xstrdup(uc->device); | 424 | return xstrdup(uc->device); |
| 423 | } | 425 | } |
| 424 | uc = uc->next; | 426 | uc = uc->next; |
diff --git a/util-linux/volume_id/ocfs2.c b/util-linux/volume_id/ocfs2.c index 9fd456597..8bcaac0b7 100644 --- a/util-linux/volume_id/ocfs2.c +++ b/util-linux/volume_id/ocfs2.c | |||
| @@ -80,7 +80,7 @@ struct ocfs2_super_block { | |||
| 80 | uint8_t s_uuid[OCFS2_VOL_UUID_LEN]; /* 128-bit uuid */ | 80 | uint8_t s_uuid[OCFS2_VOL_UUID_LEN]; /* 128-bit uuid */ |
| 81 | } __attribute__((__packed__)); | 81 | } __attribute__((__packed__)); |
| 82 | 82 | ||
| 83 | int volume_id_probe_ocfs2(struct volume_id *id, uint64_t off) | 83 | int volume_id_probe_ocfs2(struct volume_id *id, uint64_t off) |
| 84 | { | 84 | { |
| 85 | struct ocfs2_super_block *os; | 85 | struct ocfs2_super_block *os; |
| 86 | 86 | ||
diff --git a/util-linux/volume_id/highpoint.c b/util-linux/volume_id/unused_highpoint.c index 57c5cadc4..57c5cadc4 100644 --- a/util-linux/volume_id/highpoint.c +++ b/util-linux/volume_id/unused_highpoint.c | |||
diff --git a/util-linux/volume_id/hpfs.c b/util-linux/volume_id/unused_hpfs.c index 8b517569d..8b517569d 100644 --- a/util-linux/volume_id/hpfs.c +++ b/util-linux/volume_id/unused_hpfs.c | |||
diff --git a/util-linux/volume_id/isw_raid.c b/util-linux/volume_id/unused_isw_raid.c index d928245fb..d928245fb 100644 --- a/util-linux/volume_id/isw_raid.c +++ b/util-linux/volume_id/unused_isw_raid.c | |||
diff --git a/util-linux/volume_id/lsi_raid.c b/util-linux/volume_id/unused_lsi_raid.c index 730a3134e..730a3134e 100644 --- a/util-linux/volume_id/lsi_raid.c +++ b/util-linux/volume_id/unused_lsi_raid.c | |||
diff --git a/util-linux/volume_id/lvm.c b/util-linux/volume_id/unused_lvm.c index f9f9395db..caee04ba5 100644 --- a/util-linux/volume_id/lvm.c +++ b/util-linux/volume_id/unused_lvm.c | |||
| @@ -36,17 +36,14 @@ struct lvm2_super_block { | |||
| 36 | 36 | ||
| 37 | int volume_id_probe_lvm1(struct volume_id *id, uint64_t off) | 37 | int volume_id_probe_lvm1(struct volume_id *id, uint64_t off) |
| 38 | { | 38 | { |
| 39 | const uint8_t *buf; | ||
| 40 | struct lvm1_super_block *lvm; | 39 | struct lvm1_super_block *lvm; |
| 41 | 40 | ||
| 42 | dbg("probing at offset 0x%llx", (unsigned long long) off); | 41 | dbg("probing at offset 0x%llx", (unsigned long long) off); |
| 43 | 42 | ||
| 44 | buf = volume_id_get_buffer(id, off + LVM1_SB_OFF, 0x800); | 43 | lvm = volume_id_get_buffer(id, off + LVM1_SB_OFF, 0x800); |
| 45 | if (buf == NULL) | 44 | if (lvm == NULL) |
| 46 | return -1; | 45 | return -1; |
| 47 | 46 | ||
| 48 | lvm = (struct lvm1_super_block *) buf; | ||
| 49 | |||
| 50 | if (lvm->id[0] != 'H' || lvm->id[1] != 'M') | 47 | if (lvm->id[0] != 'H' || lvm->id[1] != 'M') |
| 51 | return -1; | 48 | return -1; |
| 52 | 49 | ||
diff --git a/util-linux/volume_id/mac.c b/util-linux/volume_id/unused_mac.c index 94a99bee0..8eaa17344 100644 --- a/util-linux/volume_id/mac.c +++ b/util-linux/volume_id/unused_mac.c | |||
| @@ -49,17 +49,18 @@ int volume_id_probe_mac_partition_map(struct volume_id *id, uint64_t off) | |||
| 49 | return -1; | 49 | return -1; |
| 50 | 50 | ||
| 51 | part = (struct mac_partition *) buf; | 51 | part = (struct mac_partition *) buf; |
| 52 | if ((memcmp(part->signature, "PM", 2) == 0) && | 52 | if (part->signature[0] == 'P' && part->signature[1] == 'M' /* "PM" */ |
| 53 | (memcmp(part->type, "Apple_partition_map", 19) == 0)) { | 53 | && (memcmp(part->type, "Apple_partition_map", 19) == 0) |
| 54 | ) { | ||
| 54 | /* linux creates an own subdevice for the map | 55 | /* linux creates an own subdevice for the map |
| 55 | * just return the type if the drive header is missing */ | 56 | * just return the type if the drive header is missing */ |
| 56 | volume_id_set_usage(id, VOLUME_ID_PARTITIONTABLE); | 57 | // volume_id_set_usage(id, VOLUME_ID_PARTITIONTABLE); |
| 57 | id->type = "mac_partition_map"; | 58 | // id->type = "mac_partition_map"; |
| 58 | return 0; | 59 | return 0; |
| 59 | } | 60 | } |
| 60 | 61 | ||
| 61 | driver = (struct mac_driver_desc *) buf; | 62 | driver = (struct mac_driver_desc *) buf; |
| 62 | if (memcmp(driver->signature, "ER", 2) == 0) { | 63 | if (driver->signature[0] == 'E' && driver->signature[1] == 'R') { /* "ER" */ |
| 63 | /* we are on a main device, like a CD | 64 | /* we are on a main device, like a CD |
| 64 | * just try to probe the first partition from the map */ | 65 | * just try to probe the first partition from the map */ |
| 65 | unsigned bsize = be16_to_cpu(driver->block_size); | 66 | unsigned bsize = be16_to_cpu(driver->block_size); |
| @@ -72,7 +73,7 @@ int volume_id_probe_mac_partition_map(struct volume_id *id, uint64_t off) | |||
| 72 | return -1; | 73 | return -1; |
| 73 | 74 | ||
| 74 | part = (struct mac_partition *) buf; | 75 | part = (struct mac_partition *) buf; |
| 75 | if (memcmp(part->signature, "PM", 2) != 0) | 76 | if (part->signature[0] != 'P' || part->signature[1] != 'M') /* not "PM" */ |
| 76 | return -1; | 77 | return -1; |
| 77 | 78 | ||
| 78 | part_count = be32_to_cpu(part->map_count); | 79 | part_count = be32_to_cpu(part->map_count); |
| @@ -80,11 +81,7 @@ int volume_id_probe_mac_partition_map(struct volume_id *id, uint64_t off) | |||
| 80 | 81 | ||
| 81 | if (id->partitions != NULL) | 82 | if (id->partitions != NULL) |
| 82 | free(id->partitions); | 83 | free(id->partitions); |
| 83 | id->partitions = | 84 | id->partitions = xzalloc(part_count * sizeof(struct volume_id_partition)); |
| 84 | malloc(part_count * sizeof(struct volume_id_partition)); | ||
| 85 | if (id->partitions == NULL) | ||
| 86 | return -1; | ||
| 87 | memset(id->partitions, 0x00, sizeof(struct volume_id_partition)); | ||
| 88 | 85 | ||
| 89 | id->partition_count = part_count; | 86 | id->partition_count = part_count; |
| 90 | 87 | ||
| @@ -97,27 +94,28 @@ int volume_id_probe_mac_partition_map(struct volume_id *id, uint64_t off) | |||
| 97 | return -1; | 94 | return -1; |
| 98 | 95 | ||
| 99 | part = (struct mac_partition *) buf; | 96 | part = (struct mac_partition *) buf; |
| 100 | if (memcmp(part->signature, "PM", 2) != 0) | 97 | if (part->signature[0] != 'P' || part->signature[1] != 'M') /* not "PM" */ |
| 101 | return -1; | 98 | return -1; |
| 102 | 99 | ||
| 103 | poff = be32_to_cpu(part->start_block) * bsize; | 100 | poff = be32_to_cpu(part->start_block) * bsize; |
| 104 | plen = be32_to_cpu(part->block_count) * bsize; | 101 | plen = be32_to_cpu(part->block_count) * bsize; |
| 105 | dbg("found '%s' partition entry at 0x%llx, len 0x%llx", | 102 | dbg("found '%s' partition entry at 0x%llx, len 0x%llx", |
| 106 | part->type, (unsigned long long) poff, (unsigned long long) plen); | 103 | part->type, (unsigned long long) poff, |
| 107 | 104 | (unsigned long long) plen); | |
| 108 | id->partitions[i].off = poff; | 105 | |
| 109 | id->partitions[i].len = plen; | 106 | // id->partitions[i].pt_off = poff; |
| 110 | 107 | // id->partitions[i].pt_len = plen; | |
| 111 | if (memcmp(part->type, "Apple_Free", 10) == 0) { | 108 | |
| 112 | volume_id_set_usage_part(&id->partitions[i], VOLUME_ID_UNUSED); | 109 | // if (memcmp(part->type, "Apple_Free", 10) == 0) { |
| 113 | } else if (memcmp(part->type, "Apple_partition_map", 19) == 0) { | 110 | // volume_id_set_usage_part(&id->partitions[i], VOLUME_ID_UNUSED); |
| 114 | volume_id_set_usage_part(&id->partitions[i], VOLUME_ID_PARTITIONTABLE); | 111 | // } else if (memcmp(part->type, "Apple_partition_map", 19) == 0) { |
| 115 | } else { | 112 | // volume_id_set_usage_part(&id->partitions[i], VOLUME_ID_PARTITIONTABLE); |
| 116 | volume_id_set_usage_part(&id->partitions[i], VOLUME_ID_UNPROBED); | 113 | // } else { |
| 117 | } | 114 | // volume_id_set_usage_part(&id->partitions[i], VOLUME_ID_UNPROBED); |
| 115 | // } | ||
| 118 | } | 116 | } |
| 119 | volume_id_set_usage(id, VOLUME_ID_PARTITIONTABLE); | 117 | // volume_id_set_usage(id, VOLUME_ID_PARTITIONTABLE); |
| 120 | id->type = "mac_partition_map"; | 118 | // id->type = "mac_partition_map"; |
| 121 | return 0; | 119 | return 0; |
| 122 | } | 120 | } |
| 123 | 121 | ||
diff --git a/util-linux/volume_id/minix.c b/util-linux/volume_id/unused_minix.c index 2f5209333..2f5209333 100644 --- a/util-linux/volume_id/minix.c +++ b/util-linux/volume_id/unused_minix.c | |||
diff --git a/util-linux/volume_id/msdos.c b/util-linux/volume_id/unused_msdos.c index b4b6711dc..097ee6728 100644 --- a/util-linux/volume_id/msdos.c +++ b/util-linux/volume_id/unused_msdos.c | |||
| @@ -33,7 +33,6 @@ struct msdos_partition_entry { | |||
| 33 | uint32_t nr_sects; | 33 | uint32_t nr_sects; |
| 34 | } __attribute__((packed)); | 34 | } __attribute__((packed)); |
| 35 | 35 | ||
| 36 | #define MSDOS_MAGIC "\x55\xaa" | ||
| 37 | #define MSDOS_PARTTABLE_OFFSET 0x1be | 36 | #define MSDOS_PARTTABLE_OFFSET 0x1be |
| 38 | #define MSDOS_SIG_OFF 0x1fe | 37 | #define MSDOS_SIG_OFF 0x1fe |
| 39 | #define BSIZE 0x200 | 38 | #define BSIZE 0x200 |
| @@ -68,7 +67,7 @@ int volume_id_probe_msdos_part_table(struct volume_id *id, uint64_t off) | |||
| 68 | if (buf == NULL) | 67 | if (buf == NULL) |
| 69 | return -1; | 68 | return -1; |
| 70 | 69 | ||
| 71 | if (memcmp(&buf[MSDOS_SIG_OFF], MSDOS_MAGIC, 2) != 0) | 70 | if (buf[MSDOS_SIG_OFF] != 0x55 || buf[MSDOS_SIG_OFF + 1] != 0xaa) |
| 72 | return -1; | 71 | return -1; |
| 73 | 72 | ||
| 74 | /* check flags on all entries for a valid partition table */ | 73 | /* check flags on all entries for a valid partition table */ |
| @@ -86,12 +85,8 @@ int volume_id_probe_msdos_part_table(struct volume_id *id, uint64_t off) | |||
| 86 | 85 | ||
| 87 | if (id->partitions != NULL) | 86 | if (id->partitions != NULL) |
| 88 | free(id->partitions); | 87 | free(id->partitions); |
| 89 | id->partitions = malloc(VOLUME_ID_PARTITIONS_MAX * | 88 | id->partitions = xzalloc(VOLUME_ID_PARTITIONS_MAX * |
| 90 | sizeof(struct volume_id_partition)); | 89 | sizeof(struct volume_id_partition)); |
| 91 | if (id->partitions == NULL) | ||
| 92 | return -1; | ||
| 93 | memset(id->partitions, 0x00, | ||
| 94 | VOLUME_ID_PARTITIONS_MAX * sizeof(struct volume_id_partition)); | ||
| 95 | 90 | ||
| 96 | for (i = 0; i < 4; i++) { | 91 | for (i = 0; i < 4; i++) { |
| 97 | poff = (uint64_t) le32_to_cpu(part[i].start_sect) * BSIZE; | 92 | poff = (uint64_t) le32_to_cpu(part[i].start_sect) * BSIZE; |
| @@ -102,26 +97,26 @@ int volume_id_probe_msdos_part_table(struct volume_id *id, uint64_t off) | |||
| 102 | 97 | ||
| 103 | p = &id->partitions[i]; | 98 | p = &id->partitions[i]; |
| 104 | 99 | ||
| 105 | p->partition_type_raw = part[i].sys_ind; | 100 | // p->pt_type_raw = part[i].sys_ind; |
| 106 | 101 | ||
| 107 | if (is_extended(part[i].sys_ind)) { | 102 | if (is_extended(part[i].sys_ind)) { |
| 108 | dbg("found extended partition at 0x%llx", (unsigned long long) poff); | 103 | dbg("found extended partition at 0x%llx", (unsigned long long) poff); |
| 109 | volume_id_set_usage_part(p, VOLUME_ID_PARTITIONTABLE); | 104 | // volume_id_set_usage_part(p, VOLUME_ID_PARTITIONTABLE); |
| 110 | p->type = "msdos_extended_partition"; | 105 | // p->type = "msdos_extended_partition"; |
| 111 | if (extended == 0) | 106 | if (extended == 0) |
| 112 | extended = off + poff; | 107 | extended = off + poff; |
| 113 | } else { | 108 | } else { |
| 114 | dbg("found 0x%x data partition at 0x%llx, len 0x%llx", | 109 | dbg("found 0x%x data partition at 0x%llx, len 0x%llx", |
| 115 | part[i].sys_ind, (unsigned long long) poff, (unsigned long long) plen); | 110 | part[i].sys_ind, (unsigned long long) poff, (unsigned long long) plen); |
| 116 | 111 | ||
| 117 | if (is_raid(part[i].sys_ind)) | 112 | // if (is_raid(part[i].sys_ind)) |
| 118 | volume_id_set_usage_part(p, VOLUME_ID_RAID); | 113 | // volume_id_set_usage_part(p, VOLUME_ID_RAID); |
| 119 | else | 114 | // else |
| 120 | volume_id_set_usage_part(p, VOLUME_ID_UNPROBED); | 115 | // volume_id_set_usage_part(p, VOLUME_ID_UNPROBED); |
| 121 | } | 116 | } |
| 122 | 117 | ||
| 123 | p->off = off + poff; | 118 | // p->pt_off = off + poff; |
| 124 | p->len = plen; | 119 | // p->pt_len = plen; |
| 125 | id->partition_count = i+1; | 120 | id->partition_count = i+1; |
| 126 | } | 121 | } |
| 127 | 122 | ||
| @@ -142,7 +137,7 @@ int volume_id_probe_msdos_part_table(struct volume_id *id, uint64_t off) | |||
| 142 | 137 | ||
| 143 | part = (struct msdos_partition_entry*) &buf[MSDOS_PARTTABLE_OFFSET]; | 138 | part = (struct msdos_partition_entry*) &buf[MSDOS_PARTTABLE_OFFSET]; |
| 144 | 139 | ||
| 145 | if (memcmp(&buf[MSDOS_SIG_OFF], MSDOS_MAGIC, 2) != 0) | 140 | if (buf[MSDOS_SIG_OFF] != 0x55 || buf[MSDOS_SIG_OFF + 1] != 0xaa) |
| 146 | break; | 141 | break; |
| 147 | 142 | ||
| 148 | next = 0; | 143 | next = 0; |
| @@ -163,21 +158,23 @@ int volume_id_probe_msdos_part_table(struct volume_id *id, uint64_t off) | |||
| 163 | part[i].sys_ind, (unsigned long long) poff, (unsigned long long) plen); | 158 | part[i].sys_ind, (unsigned long long) poff, (unsigned long long) plen); |
| 164 | 159 | ||
| 165 | /* we always start at the 5th entry */ | 160 | /* we always start at the 5th entry */ |
| 166 | while (id->partition_count < 4) | 161 | // while (id->partition_count < 4) |
| 167 | volume_id_set_usage_part(&id->partitions[id->partition_count++], VOLUME_ID_UNUSED); | 162 | // volume_id_set_usage_part(&id->partitions[id->partition_count++], VOLUME_ID_UNUSED); |
| 163 | if (id->partition_count < 4) | ||
| 164 | id->partition_count = 4; | ||
| 168 | 165 | ||
| 169 | p = &id->partitions[id->partition_count]; | 166 | p = &id->partitions[id->partition_count]; |
| 170 | 167 | ||
| 171 | if (is_raid(part[i].sys_ind)) | 168 | // if (is_raid(part[i].sys_ind)) |
| 172 | volume_id_set_usage_part(p, VOLUME_ID_RAID); | 169 | // volume_id_set_usage_part(p, VOLUME_ID_RAID); |
| 173 | else | 170 | // else |
| 174 | volume_id_set_usage_part(p, VOLUME_ID_UNPROBED); | 171 | // volume_id_set_usage_part(p, VOLUME_ID_UNPROBED); |
| 175 | 172 | ||
| 176 | p->off = current + poff; | 173 | // p->pt_off = current + poff; |
| 177 | p->len = plen; | 174 | // p->pt_len = plen; |
| 178 | id->partition_count++; | 175 | id->partition_count++; |
| 179 | 176 | ||
| 180 | p->partition_type_raw = part[i].sys_ind; | 177 | // p->pt_type_raw = part[i].sys_ind; |
| 181 | 178 | ||
| 182 | if (id->partition_count >= VOLUME_ID_PARTITIONS_MAX) { | 179 | if (id->partition_count >= VOLUME_ID_PARTITIONS_MAX) { |
| 183 | dbg("too many partitions"); | 180 | dbg("too many partitions"); |
| @@ -189,8 +186,8 @@ int volume_id_probe_msdos_part_table(struct volume_id *id, uint64_t off) | |||
| 189 | current = next; | 186 | current = next; |
| 190 | } | 187 | } |
| 191 | 188 | ||
| 192 | volume_id_set_usage(id, VOLUME_ID_PARTITIONTABLE); | 189 | // volume_id_set_usage(id, VOLUME_ID_PARTITIONTABLE); |
| 193 | id->type = "msdos_partition_table"; | 190 | // id->type = "msdos_partition_table"; |
| 194 | 191 | ||
| 195 | return 0; | 192 | return 0; |
| 196 | } | 193 | } |
diff --git a/util-linux/volume_id/nvidia_raid.c b/util-linux/volume_id/unused_nvidia_raid.c index 692aad111..692aad111 100644 --- a/util-linux/volume_id/nvidia_raid.c +++ b/util-linux/volume_id/unused_nvidia_raid.c | |||
diff --git a/util-linux/volume_id/promise_raid.c b/util-linux/volume_id/unused_promise_raid.c index 75c6f89d4..75c6f89d4 100644 --- a/util-linux/volume_id/promise_raid.c +++ b/util-linux/volume_id/unused_promise_raid.c | |||
diff --git a/util-linux/volume_id/silicon_raid.c b/util-linux/volume_id/unused_silicon_raid.c index 51431124b..51431124b 100644 --- a/util-linux/volume_id/silicon_raid.c +++ b/util-linux/volume_id/unused_silicon_raid.c | |||
diff --git a/util-linux/volume_id/ufs.c b/util-linux/volume_id/unused_ufs.c index ba76876b5..ba76876b5 100644 --- a/util-linux/volume_id/ufs.c +++ b/util-linux/volume_id/unused_ufs.c | |||
diff --git a/util-linux/volume_id/via_raid.c b/util-linux/volume_id/unused_via_raid.c index a3e94e085..433294699 100644 --- a/util-linux/volume_id/via_raid.c +++ b/util-linux/volume_id/unused_via_raid.c | |||
| @@ -53,7 +53,7 @@ int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size) | |||
| 53 | if (via == NULL) | 53 | if (via == NULL) |
| 54 | return -1; | 54 | return -1; |
| 55 | 55 | ||
| 56 | if (via->signature != cpu_to_le16(VIA_SIGNATURE)) | 56 | if (via->signature != cpu_to_le16(VIA_SIGNATURE)) |
| 57 | return -1; | 57 | return -1; |
| 58 | 58 | ||
| 59 | if (via->version_number > 1) | 59 | if (via->version_number > 1) |
diff --git a/util-linux/volume_id/volume_id.c b/util-linux/volume_id/volume_id.c index a26e2bcf0..de9aae2ce 100644 --- a/util-linux/volume_id/volume_id.c +++ b/util-linux/volume_id/volume_id.c | |||
| @@ -20,6 +20,31 @@ | |||
| 20 | 20 | ||
| 21 | #include "volume_id_internal.h" | 21 | #include "volume_id_internal.h" |
| 22 | 22 | ||
| 23 | |||
| 24 | /* Some detection routines do not set label or uuid anyway, | ||
| 25 | * so they are disabled. */ | ||
| 26 | |||
| 27 | /* Looks for partitions, we don't use it: */ | ||
| 28 | #define ENABLE_FEATURE_VOLUMEID_MAC 0 | ||
| 29 | /* #define ENABLE_FEATURE_VOLUMEID_MSDOS 0 - NB: this one | ||
| 30 | * was not properly added to probe table anyway - ??! */ | ||
| 31 | |||
| 32 | /* None of RAIDs have label or uuid, except LinuxRAID: */ | ||
| 33 | #define ENABLE_FEATURE_VOLUMEID_HIGHPOINTRAID 0 | ||
| 34 | #define ENABLE_FEATURE_VOLUMEID_ISWRAID 0 | ||
| 35 | #define ENABLE_FEATURE_VOLUMEID_LSIRAID 0 | ||
| 36 | #define ENABLE_FEATURE_VOLUMEID_LVM 0 | ||
| 37 | #define ENABLE_FEATURE_VOLUMEID_NVIDIARAID 0 | ||
| 38 | #define ENABLE_FEATURE_VOLUMEID_PROMISERAID 0 | ||
| 39 | #define ENABLE_FEATURE_VOLUMEID_SILICONRAID 0 | ||
| 40 | #define ENABLE_FEATURE_VOLUMEID_VIARAID 0 | ||
| 41 | |||
| 42 | /* These filesystems also have no label or uuid: */ | ||
| 43 | #define ENABLE_FEATURE_VOLUMEID_MINIX 0 | ||
| 44 | #define ENABLE_FEATURE_VOLUMEID_HPFS 0 | ||
| 45 | #define ENABLE_FEATURE_VOLUMEID_UFS 0 | ||
| 46 | |||
| 47 | |||
| 23 | typedef int (*raid_probe_fptr)(struct volume_id *id, uint64_t off, uint64_t size); | 48 | typedef int (*raid_probe_fptr)(struct volume_id *id, uint64_t off, uint64_t size); |
| 24 | typedef int (*probe_fptr)(struct volume_id *id, uint64_t off); | 49 | typedef int (*probe_fptr)(struct volume_id *id, uint64_t off); |
| 25 | 50 | ||
| @@ -68,10 +93,9 @@ static const probe_fptr fs1[] = { | |||
| 68 | #if ENABLE_FEATURE_VOLUMEID_FAT | 93 | #if ENABLE_FEATURE_VOLUMEID_FAT |
| 69 | volume_id_probe_vfat, | 94 | volume_id_probe_vfat, |
| 70 | #endif | 95 | #endif |
| 71 | // This one only looks for partitions, we don't use it | 96 | #if ENABLE_FEATURE_VOLUMEID_MAC |
| 72 | //#if ENABLE_FEATURE_VOLUMEID_MAC | 97 | volume_id_probe_mac_partition_map, |
| 73 | // volume_id_probe_mac_partition_map, | 98 | #endif |
| 74 | //#endif | ||
| 75 | #if ENABLE_FEATURE_VOLUMEID_XFS | 99 | #if ENABLE_FEATURE_VOLUMEID_XFS |
| 76 | volume_id_probe_xfs, | 100 | volume_id_probe_xfs, |
| 77 | #endif | 101 | #endif |
diff --git a/util-linux/volume_id/volume_id_internal.h b/util-linux/volume_id/volume_id_internal.h index 8c7ca035a..78b4a7b8a 100644 --- a/util-linux/volume_id/volume_id_internal.h +++ b/util-linux/volume_id/volume_id_internal.h | |||
| @@ -163,25 +163,25 @@ void volume_id_free_buffer(struct volume_id *id); | |||
| 163 | 163 | ||
| 164 | /* RAID */ | 164 | /* RAID */ |
| 165 | 165 | ||
| 166 | int volume_id_probe_highpoint_37x_raid(struct volume_id *id, uint64_t off); | 166 | //int volume_id_probe_highpoint_37x_raid(struct volume_id *id, uint64_t off); |
| 167 | int volume_id_probe_highpoint_45x_raid(struct volume_id *id, uint64_t off, uint64_t size); | 167 | //int volume_id_probe_highpoint_45x_raid(struct volume_id *id, uint64_t off, uint64_t size); |
| 168 | 168 | ||
| 169 | int volume_id_probe_intel_software_raid(struct volume_id *id, uint64_t off, uint64_t size); | 169 | //int volume_id_probe_intel_software_raid(struct volume_id *id, uint64_t off, uint64_t size); |
| 170 | 170 | ||
| 171 | int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size); | 171 | int volume_id_probe_linux_raid(struct volume_id *id, uint64_t off, uint64_t size); |
| 172 | 172 | ||
| 173 | int volume_id_probe_lsi_mega_raid(struct volume_id *id, uint64_t off, uint64_t size); | 173 | //int volume_id_probe_lsi_mega_raid(struct volume_id *id, uint64_t off, uint64_t size); |
| 174 | 174 | ||
| 175 | int volume_id_probe_nvidia_raid(struct volume_id *id, uint64_t off, uint64_t size); | 175 | //int volume_id_probe_nvidia_raid(struct volume_id *id, uint64_t off, uint64_t size); |
| 176 | 176 | ||
| 177 | int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, uint64_t off, uint64_t size); | 177 | //int volume_id_probe_promise_fasttrack_raid(struct volume_id *id, uint64_t off, uint64_t size); |
| 178 | 178 | ||
| 179 | int volume_id_probe_silicon_medley_raid(struct volume_id *id, uint64_t off, uint64_t size); | 179 | //int volume_id_probe_silicon_medley_raid(struct volume_id *id, uint64_t off, uint64_t size); |
| 180 | 180 | ||
| 181 | int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size); | 181 | //int volume_id_probe_via_raid(struct volume_id *id, uint64_t off, uint64_t size); |
| 182 | 182 | ||
| 183 | int volume_id_probe_lvm1(struct volume_id *id, uint64_t off); | 183 | //int volume_id_probe_lvm1(struct volume_id *id, uint64_t off); |
| 184 | int volume_id_probe_lvm2(struct volume_id *id, uint64_t off); | 184 | //int volume_id_probe_lvm2(struct volume_id *id, uint64_t off); |
| 185 | 185 | ||
| 186 | /* FS */ | 186 | /* FS */ |
| 187 | 187 | ||
| @@ -193,7 +193,7 @@ int volume_id_probe_vfat(struct volume_id *id, uint64_t off); | |||
| 193 | 193 | ||
| 194 | int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off); | 194 | int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off); |
| 195 | 195 | ||
| 196 | int volume_id_probe_hpfs(struct volume_id *id, uint64_t off); | 196 | //int volume_id_probe_hpfs(struct volume_id *id, uint64_t off); |
| 197 | 197 | ||
| 198 | int volume_id_probe_iso9660(struct volume_id *id, uint64_t off); | 198 | int volume_id_probe_iso9660(struct volume_id *id, uint64_t off); |
| 199 | 199 | ||
| @@ -205,7 +205,7 @@ int volume_id_probe_luks(struct volume_id *id, uint64_t off); | |||
| 205 | 205 | ||
| 206 | //int volume_id_probe_mac_partition_map(struct volume_id *id, uint64_t off); | 206 | //int volume_id_probe_mac_partition_map(struct volume_id *id, uint64_t off); |
| 207 | 207 | ||
| 208 | int volume_id_probe_minix(struct volume_id *id, uint64_t off); | 208 | //int volume_id_probe_minix(struct volume_id *id, uint64_t off); |
| 209 | 209 | ||
| 210 | //int volume_id_probe_msdos_part_table(struct volume_id *id, uint64_t off); | 210 | //int volume_id_probe_msdos_part_table(struct volume_id *id, uint64_t off); |
| 211 | 211 | ||
| @@ -221,6 +221,6 @@ int volume_id_probe_sysv(struct volume_id *id, uint64_t off); | |||
| 221 | 221 | ||
| 222 | int volume_id_probe_udf(struct volume_id *id, uint64_t off); | 222 | int volume_id_probe_udf(struct volume_id *id, uint64_t off); |
| 223 | 223 | ||
| 224 | int volume_id_probe_ufs(struct volume_id *id, uint64_t off); | 224 | //int volume_id_probe_ufs(struct volume_id *id, uint64_t off); |
| 225 | 225 | ||
| 226 | int volume_id_probe_xfs(struct volume_id *id, uint64_t off); | 226 | int volume_id_probe_xfs(struct volume_id *id, uint64_t off); |
