X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=extras%2Fvolume_id%2Flib%2Fhighpoint.c;h=33554f29a3001f62baee83389e0d6ec8fa8e0a75;hp=e441edb776fd3e7381da38d38c376295ced02969;hb=5d89ef7bf94d8a708a1159be22eb1cf458a1d101;hpb=f7dd3a57a40282f1c3fb9ad90a30d58b31b64ff8 diff --git a/extras/volume_id/lib/highpoint.c b/extras/volume_id/lib/highpoint.c index e441edb77..33554f29a 100644 --- a/extras/volume_id/lib/highpoint.c +++ b/extras/volume_id/lib/highpoint.c @@ -3,19 +3,24 @@ * * Copyright (C) 2004 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 @@ -24,7 +29,7 @@ #include #include "libvolume_id.h" -#include "util.h" +#include "libvolume_id-private.h" struct hpt37x_meta { uint8_t filler1[32]; @@ -43,13 +48,13 @@ struct hpt45x_meta { #define HPT45X_MAGIC_BAD 0x5a7816fd -int volume_id_probe_highpoint_37x_raid(struct volume_id *id, uint64_t off) +int volume_id_probe_highpoint_37x_raid(struct volume_id *id, uint64_t off, uint64_t size) { const uint8_t *buf; struct hpt37x_meta *hpt; uint32_t magic; - info("probing at offset 0x%llx", (unsigned long long) off); + info("probing at offset 0x%" PRIx64 "\n", off); buf = volume_id_get_buffer(id, off + HPT37X_CONFIG_OFF, 0x200); if (buf == NULL) @@ -73,8 +78,7 @@ int volume_id_probe_highpoint_45x_raid(struct volume_id *id, uint64_t off, uint6 uint64_t meta_off; uint32_t magic; - dbg("probing at offset 0x%llx, size 0x%llx", - (unsigned long long) off, (unsigned long long) size); + dbg("probing at offset 0x%" PRIx64 ", size 0x%" PRIx64 "\n", off, size); if (size < 0x10000) return -1;