X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=compat%2Finclude%2Fbylabel.h;h=baa334a7042deb472b706fe421ed789f585f6dbb;hb=26ce8fc8f42b8cdd92e9eaadae48be256813b001;hp=00ed284a3241d1f853bec4c85dc081990b5bdf27;hpb=8954518fe88156827aa958745ba1eb9cea4b42fa;p=dump.git diff --git a/compat/include/bylabel.h b/compat/include/bylabel.h index 00ed284..baa334a 100644 --- a/compat/include/bylabel.h +++ b/compat/include/bylabel.h @@ -1 +1,41 @@ +/* + * Ported to Linux's Second Extended File System as part of the + * dump and restore backup suit + * 1999-02-22 Arkadiusz Mi¶kiewicz + * - added Native Language Support + * 2000-01-20 James Antill + * - Added error message if /proc/partitions cannot be opened + * 2000-05-09 Erik Troan + * - Added cache for UUID and disk labels + * Wed Aug 16 2000 Erik Troan + * - Ported to dump/restore + * Stelian Pop - Alcôve , 2000-2002 + * + * $Id: bylabel.h,v 1.6 2004/07/05 15:02:36 stelian Exp $ + */ + +#ifndef _BYLABEL_H_ +#define _BYLABEL_H_ + +#include + +#ifdef HAVE_BLKID + +#include + +static inline const char * get_device_name(const char * item) { + return blkid_get_devname(NULL, item, NULL); +} + +static inline const char * get_device_label(const char * spec) { + return blkid_get_tag_value(NULL, "LABEL", spec); +} + +#else + const char * get_device_name(const char * item); +const char * get_device_label(const char * spec); + +#endif + +#endif /* !_BYLABEL_H_ */