X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=extras%2Fvolume_id%2Flib%2Fhfs.c;h=903378b34ed0fb8acc937ed963afde23cb052ba5;hb=387a8271207b4e921258194cf359039babbc33b9;hp=b3370460bc6cf7088d7e15962daf3ab4c3fe53c5;hpb=ac877d7cf46e25bd50d17450e74f3b0346a8d5a1;p=elogind.git diff --git a/extras/volume_id/lib/hfs.c b/extras/volume_id/lib/hfs.c index b3370460b..903378b34 100644 --- a/extras/volume_id/lib/hfs.c +++ b/extras/volume_id/lib/hfs.c @@ -1,21 +1,26 @@ /* * volume_id - reads filesystem label and uuid * - * Copyright (C) 2004 Kay Sievers + * Copyright (C) 2004-2008 Kay Sievers * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation version 2 of the License. + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif -#ifdef HAVE_CONFIG_H -# include -#endif - #include #include #include @@ -25,7 +30,6 @@ #include "libvolume_id.h" #include "libvolume_id-private.h" -#include "util.h" #include "md5.h" struct hfs_finder_info{ @@ -184,7 +188,7 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t siz struct hfsplus_extent extents[HFSPLUS_EXTENT_COUNT]; const uint8_t *buf; - info("probing at offset 0x%llx\n", (unsigned long long) off); + info("probing at offset 0x%" PRIx64 "\n", off); buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200); if (buf == NULL) @@ -207,7 +211,7 @@ int volume_id_probe_hfs_hfsplus(struct volume_id *id, uint64_t off, uint64_t siz off += (alloc_first_block * 512) + (embed_first_block * alloc_block_size); - dbg("hfs wrapped hfs+ found at offset 0x%llx\n", (unsigned long long) off); + dbg("hfs wrapped hfs+ found at offset 0x%" PRIx64 "\n", off); buf = volume_id_get_buffer(id, off + HFS_SUPERBLOCK_OFFSET, 0x200); if (buf == NULL)