chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
volume_id: add missing return
[elogind.git]
/
extras
/
volume_id
/
libvolume_id
/
volume_id.c
diff --git
a/extras/volume_id/libvolume_id/volume_id.c
b/extras/volume_id/libvolume_id/volume_id.c
index 1daf1cbd74c4e0685fc4c6eb8e3402ae5fee0556..6a900ab2818bb72e171d54954e2928ab5ca064c7 100644
(file)
--- a/
extras/volume_id/libvolume_id/volume_id.c
+++ b/
extras/volume_id/libvolume_id/volume_id.c
@@
-39,40
+39,42
@@
int volume_id_probe_raid(struct volume_id *id, uint64_t off, uint64_t size)
/* probe for raid first, cause fs probes may be successful on raid members */
if (size) {
if (volume_id_probe_linux_raid(id, off, size) == 0)
/* probe for raid first, cause fs probes may be successful on raid members */
if (size) {
if (volume_id_probe_linux_raid(id, off, size) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_intel_software_raid(id, off, size) == 0)
if (volume_id_probe_intel_software_raid(id, off, size) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_lsi_mega_raid(id, off, size) == 0)
if (volume_id_probe_lsi_mega_raid(id, off, size) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_via_raid(id, off, size) == 0)
if (volume_id_probe_via_raid(id, off, size) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_silicon_medley_raid(id, off, size) == 0)
if (volume_id_probe_silicon_medley_raid(id, off, size) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_nvidia_raid(id, off, size) == 0)
if (volume_id_probe_nvidia_raid(id, off, size) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_promise_fasttrack_raid(id, off, size) == 0)
if (volume_id_probe_promise_fasttrack_raid(id, off, size) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_highpoint_45x_raid(id, off, size) == 0)
if (volume_id_probe_highpoint_45x_raid(id, off, size) == 0)
- goto
exit
;
+ goto
found
;
}
if (volume_id_probe_lvm1(id, off) == 0)
}
if (volume_id_probe_lvm1(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_lvm2(id, off) == 0)
if (volume_id_probe_lvm2(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_highpoint_37x_raid(id, off) == 0)
if (volume_id_probe_highpoint_37x_raid(id, off) == 0)
- goto
exit
;
+ goto
found
;
-exit:
+ return -1;
+
+found:
/* If recognized, we free the allocated buffers */
volume_id_free_buffer(id);
return 0;
/* If recognized, we free the allocated buffers */
volume_id_free_buffer(id);
return 0;
@@
-84,72
+86,72
@@
int volume_id_probe_filesystem(struct volume_id *id, uint64_t off, uint64_t size
return -EINVAL;
if (volume_id_probe_luks(id, off) == 0)
return -EINVAL;
if (volume_id_probe_luks(id, off) == 0)
- goto
exit
;
+ goto
found
;
/* signature in the first block, only small buffer needed */
if (volume_id_probe_vfat(id, off) == 0)
/* signature in the first block, only small buffer needed */
if (volume_id_probe_vfat(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_xfs(id, off) == 0)
if (volume_id_probe_xfs(id, off) == 0)
- goto
exit
;
+ goto
found
;
/* fill buffer with maximum */
volume_id_get_buffer(id, 0, SB_BUFFER_SIZE);
if (volume_id_probe_linux_swap(id, off) == 0)
/* fill buffer with maximum */
volume_id_get_buffer(id, 0, SB_BUFFER_SIZE);
if (volume_id_probe_linux_swap(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_ext(id, off) == 0)
if (volume_id_probe_ext(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_reiserfs(id, off) == 0)
if (volume_id_probe_reiserfs(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_jfs(id, off) == 0)
if (volume_id_probe_jfs(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_udf(id, off) == 0)
if (volume_id_probe_udf(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_iso9660(id, off) == 0)
if (volume_id_probe_iso9660(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_hfs_hfsplus(id, off) == 0)
if (volume_id_probe_hfs_hfsplus(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_ufs(id, off) == 0)
if (volume_id_probe_ufs(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_ntfs(id, off) == 0)
if (volume_id_probe_ntfs(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_cramfs(id, off) == 0)
if (volume_id_probe_cramfs(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_romfs(id, off) == 0)
if (volume_id_probe_romfs(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_hpfs(id, off) == 0)
if (volume_id_probe_hpfs(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_sysv(id, off) == 0)
if (volume_id_probe_sysv(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_minix(id, off) == 0)
if (volume_id_probe_minix(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_ocfs1(id, off) == 0)
if (volume_id_probe_ocfs1(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_ocfs2(id, off) == 0)
if (volume_id_probe_ocfs2(id, off) == 0)
- goto
exit
;
+ goto
found
;
if (volume_id_probe_vxfs(id, off) == 0)
if (volume_id_probe_vxfs(id, off) == 0)
- goto
exit
;
+ goto
found
;
return -1;
return -1;
-
exit
:
+
found
:
/* If recognized, we free the allocated buffers */
volume_id_free_buffer(id);
return 0;
/* If recognized, we free the allocated buffers */
volume_id_free_buffer(id);
return 0;