X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=extras%2Fvolume_id%2Flib%2Futil.c;h=0fb8937962b2e08d3bade17dca2128c83d3580a7;hb=3eb46ec6ddeb31d9886ebb736d1d7b3534d2f354;hp=2a63efe8f7e2aa9793c3de8b361056306ef6fbee;hpb=c70560feef0eb61a150cd2f956f0beead4313ffe;p=elogind.git diff --git a/extras/volume_id/lib/util.c b/extras/volume_id/lib/util.c index 2a63efe8f..0fb893796 100644 --- a/extras/volume_id/lib/util.c +++ b/extras/volume_id/lib/util.c @@ -3,19 +3,24 @@ * * Copyright (C) 2005-2007 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 @@ -26,7 +31,7 @@ #include #include "libvolume_id.h" -#include "util.h" +#include "libvolume_id-private.h" /* count of characters used to encode one unicode char */ static int utf8_encoded_expected_len(const char *str) @@ -268,7 +273,6 @@ void volume_id_set_uuid(struct volume_id *id, const uint8_t *buf, size_t len, en count = 4; break; case UUID_64BIT_LE: - case UUID_64BIT_BE: count = 8; break; case UUID_DCE: @@ -301,11 +305,6 @@ set: buf[7], buf[6], buf[5], buf[4], buf[3], buf[2], buf[1], buf[0]); break; - case UUID_64BIT_BE: - sprintf(id->uuid,"%02X%02X%02X%02X%02X%02X%02X%02X", - buf[0], buf[1], buf[2], buf[3], - buf[4], buf[5], buf[6], buf[7]); - break; case UUID_DCE: sprintf(id->uuid, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",