| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
> |
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
2 |
| 13 |
|
| 14 |
|
| 15 |
#ifndef _BYLABEL_H_ |
| 16 |
#define _BYLABEL_H_ |
| 17 |
|
| 18 |
#include "config.h" |
| 19 |
|
| 20 |
#ifdef HAVE_BLKID |
| 21 |
|
| 22 |
#include <blkid/blkid.h> |
| 23 |
#include <stdio.h> |
| 24 |
|
| 25 |
inline const char * get_device_name(const char * item) { |
| 26 |
return blkid_get_devname(NULL, item, NULL); |
| 27 |
} |
| 28 |
|
| 29 |
inline const char * get_device_label(const char * spec) { |
| 30 |
return blkid_get_tag_value(NULL, "LABEL", spec); |
| 31 |
} |
| 32 |
|
| 33 |
#else |
| 34 |
|
| 35 |
const char * get_device_name(const char * item); |
| 36 |
const char * get_device_label(const char * spec); |
| 37 |
|
| 38 |
#endif |
| 39 |
|
| 40 |
#endif |