mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
Initial s390-tools-2.0.0 import
This commit is based on the s390-tools-1.39.0 version. Changes on top of s390-tools-1.39.0: - Add MIT license to all source files - Add LICENSE file - Transform REAMDE to README.md (markdown) - Add AUTHORS.md file - Add CONTRIBUTING.md file - Move changelog from README to CHANGELOG.md file Reviewed-by: Stefan Haberland <sth@linux.vnet.ibm.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Scanner for the /proc files
|
||||
*
|
||||
* Copyright IBM Corp. 2001, 2017
|
||||
*
|
||||
* s390-tools is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the MIT license. See LICENSE for details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef LIB_UTIL_PROC_H
|
||||
#define LIB_UTIL_PROC_H
|
||||
|
||||
#include <ctype.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
struct util_proc_part_entry {
|
||||
dev_t device;
|
||||
size_t blockcount;
|
||||
char *name;
|
||||
};
|
||||
|
||||
struct util_proc_dev_entry {
|
||||
int blockdev;
|
||||
dev_t device;
|
||||
char *name;
|
||||
};
|
||||
|
||||
/**
|
||||
* Container for the fields of the output of /proc/mounts (man fstab)
|
||||
*/
|
||||
struct util_proc_mnt_entry {
|
||||
char *spec;
|
||||
char *file;
|
||||
char *vfstype;
|
||||
char *mntOpts;
|
||||
char *dump;
|
||||
char *passno;
|
||||
};
|
||||
|
||||
int util_proc_part_get_entry(dev_t device, struct util_proc_part_entry *entry);
|
||||
void util_proc_part_free_entry(struct util_proc_part_entry *entry);
|
||||
int util_proc_dev_get_entry(dev_t dev, int blockdev,
|
||||
struct util_proc_dev_entry *entry);
|
||||
void util_proc_dev_free_entry(struct util_proc_dev_entry *entry);
|
||||
int util_proc_mnt_get_entry(const char *file_name, const char *spec,
|
||||
struct util_proc_mnt_entry *entry);
|
||||
void util_proc_mnt_free_entry(struct util_proc_mnt_entry *entry);
|
||||
|
||||
#endif /* LIB_UTIL_PROC_H */
|
||||
Reference in New Issue
Block a user