/proc/mounts
This commit is contained in:
parent
a2e59ba316
commit
c13366fd92
|
@ -50,6 +50,7 @@ struct Mount {
|
||||||
void *data; /* private data */
|
void *data; /* private data */
|
||||||
uint32_t hashseed; /* Random seed for vfshash */
|
uint32_t hashseed; /* Random seed for vfshash */
|
||||||
unsigned long mountFlags; /* Flags for mount */
|
unsigned long mountFlags; /* Flags for mount */
|
||||||
|
char pathName[PATH_MAX]; /* path name of mount point */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MountOps {
|
struct MountOps {
|
||||||
|
|
|
@ -257,9 +257,18 @@ int VfsProcfsClose(struct file *filep)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int VfsProcfsStatfs(struct Mount *mnt, struct statfs *buf)
|
||||||
|
{
|
||||||
|
(void)memset_s(buf, sizeof(struct statfs), 0, sizeof(struct statfs));
|
||||||
|
buf->f_type = PROCFS_MAGIC;
|
||||||
|
|
||||||
|
return LOS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
const struct MountOps procfs_operations = {
|
const struct MountOps procfs_operations = {
|
||||||
.Mount = VfsProcfsMount,
|
.Mount = VfsProcfsMount,
|
||||||
.Unmount = NULL,
|
.Unmount = NULL,
|
||||||
|
.Statfs = VfsProcStatfs,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct VnodeOps g_procfsVops = {
|
static struct VnodeOps g_procfsVops = {
|
||||||
|
|
Loading…
Reference in New Issue