projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
101d112
)
libvolume_id: squashfs+LZMA compression detection
author
Michael Prokop
<mika@grml.org>
Mon, 26 Nov 2007 00:03:08 +0000
(
01:03
+0100)
committer
Kay Sievers
<kay.sievers@vrfy.org>
Mon, 26 Nov 2007 00:03:08 +0000
(
01:03
+0100)
extras/volume_id/lib/squashfs.c
patch
|
blob
|
history
diff --git
a/extras/volume_id/lib/squashfs.c
b/extras/volume_id/lib/squashfs.c
index
402a114
..
70b322d
100644
(file)
--- a/
extras/volume_id/lib/squashfs.c
+++ b/
extras/volume_id/lib/squashfs.c
@@
-27,6
+27,7
@@
#include "util.h"
#define SQUASHFS_MAGIC 0x73717368
+#define SQUASHFS_MAGIC_LZMA 0x73687371
struct squashfs_super {
uint32_t s_magic;
@@
-60,6
+61,11
@@
int volume_id_probe_squashfs(struct volume_id *id, uint64_t off, uint64_t size)
bswap_16(sqs->s_major), bswap_16(sqs->s_minor));
goto found;
}
+ if (sqs->s_magic == bswap_32(SQUASHFS_MAGIC_LZMA)) {
+ snprintf(id->type_version, sizeof(id->type_version), "%u.%u",
+ sqs->s_major, sqs->s_minor);
+ goto found;
+ }
return -1;