mdev: fix breakage caused by unified parser usage
[oweals/busybox.git] / util-linux / volume_id / volume_id_internal.h
index 78b4a7b8ad2011a95a08268a3aa886c4adb7d036..fe3547d13394a2bfc76dd6922c0a679bcf86e497 100644 (file)
@@ -21,6 +21,9 @@
 #include "libbb.h"
 #include "volume_id.h"
 
+#if __GNUC_PREREQ(4,1)
+# pragma GCC visibility push(hidden)
+#endif
 
 #define dbg(...) ((void)0)
 /* #define dbg(...) bb_error_msg(__VA_ARGS__) */
@@ -58,6 +61,17 @@ struct volume_id_partition {
 #endif
 
 struct volume_id {
+       int             fd;
+//     int             fd_close:1;
+       size_t          sbbuf_len;
+       size_t          seekbuf_len;
+       uint8_t         *sbbuf;
+       uint8_t         *seekbuf;
+       uint64_t        seekbuf_off;
+#ifdef UNUSED_PARTITION_CODE
+       struct volume_id_partition *partitions;
+       size_t          partition_count;
+#endif
 //     uint8_t         label_raw[VOLUME_ID_LABEL_SIZE];
 //     size_t          label_raw_len;
        char            label[VOLUME_ID_LABEL_SIZE+1];
@@ -69,22 +83,9 @@ struct volume_id {
 //     smallint        usage_id;
 //     const char      *usage;
 //     const char      *type;
-
-#ifdef UNUSED_PARTITION_CODE
-       struct volume_id_partition *partitions;
-       size_t          partition_count;
-#endif
-
-       int             fd;
-       uint8_t         *sbbuf;
-       uint8_t         *seekbuf;
-       size_t          sbbuf_len;
-       uint64_t        seekbuf_off;
-       size_t          seekbuf_len;
-//     int             fd_close:1;
 };
 
-struct volume_id *volume_id_open_node(const char *path);
+struct volume_id *volume_id_open_node(int fd);
 int volume_id_probe_all(struct volume_id *id, uint64_t off, uint64_t size);
 void free_volume_id(struct volume_id *id);
 
@@ -224,3 +225,7 @@ int volume_id_probe_udf(struct volume_id *id, uint64_t off);
 //int volume_id_probe_ufs(struct volume_id *id, uint64_t off);
 
 int volume_id_probe_xfs(struct volume_id *id, uint64_t off);
+
+#if __GNUC_PREREQ(4,1)
+# pragma GCC visibility pop
+#endif