static const char *fuse_meminfo_path = "/meminfo";
-static int lxcProcGetattr(const char *path, struct stat *stbuf)
+static int
+lxcProcGetattr(const char *path,
+ struct stat *stbuf)
{
g_autofree char *mempath = NULL;
struct stat sb;
return 0;
}
-static int lxcProcReaddir(const char *path, void *buf,
- fuse_fill_dir_t filler,
- off_t offset G_GNUC_UNUSED,
- struct fuse_file_info *fi G_GNUC_UNUSED)
+static int
+lxcProcReaddir(const char *path,
+ void *buf,
+ fuse_fill_dir_t filler,
+ off_t offset G_GNUC_UNUSED,
+ struct fuse_file_info *fi G_GNUC_UNUSED)
{
if (STRNEQ(path, "/"))
return -ENOENT;
return 0;
}
-static int lxcProcOpen(const char *path,
- struct fuse_file_info *fi)
+static int
+lxcProcOpen(const char *path,
+ struct fuse_file_info *fi)
{
if (STRNEQ(path, fuse_meminfo_path))
return -ENOENT;
return 0;
}
-static int lxcProcHostRead(char *path, char *buf, size_t size, off_t offset)
+static int
+lxcProcHostRead(char *path,
+ char *buf,
+ size_t size,
+ off_t offset)
{
int fd;
int res;
return res;
}
-static int lxcProcReadMeminfo(char *hostpath, virDomainDef *def,
- char *buf, size_t size, off_t offset)
+static int
+lxcProcReadMeminfo(char *hostpath,
+ virDomainDef *def,
+ char *buf,
+ size_t size,
+ off_t offset)
{
int res;
FILE *fd = NULL;
return res;
}
-static int lxcProcRead(const char *path,
- char *buf,
- size_t size,
- off_t offset,
- struct fuse_file_info *fi G_GNUC_UNUSED)
+static int
+lxcProcRead(const char *path,
+ char *buf,
+ size_t size,
+ off_t offset,
+ struct fuse_file_info *fi G_GNUC_UNUSED)
{
int res = -ENOENT;
g_autofree char *hostpath = NULL;
.read = lxcProcRead,
};
-static void lxcFuseDestroy(struct virLXCFuse *fuse)
+static void
+lxcFuseDestroy(struct virLXCFuse *fuse)
{
VIR_LOCK_GUARD lock = virLockGuardLock(&fuse->lock);
g_clear_pointer(&fuse->fuse, fuse_destroy);
}
-static void lxcFuseRun(void *opaque)
+static void
+lxcFuseRun(void *opaque)
{
struct virLXCFuse *fuse = opaque;
lxcFuseDestroy(fuse);
}
-int lxcSetupFuse(struct virLXCFuse **f, virDomainDef *def)
+int
+lxcSetupFuse(struct virLXCFuse **f,
+ virDomainDef *def)
{
int ret = -1;
struct fuse_args args = FUSE_ARGS_INIT(0, NULL);
goto cleanup;
}
-int lxcStartFuse(struct virLXCFuse *fuse)
+int
+lxcStartFuse(struct virLXCFuse *fuse)
{
if (virThreadCreateFull(&fuse->thread, false, lxcFuseRun,
"lxc-fuse", false, (void *)fuse) < 0) {
return 0;
}
-void lxcFreeFuse(struct virLXCFuse **f)
+void
+lxcFreeFuse(struct virLXCFuse **f)
{
struct virLXCFuse *fuse = *f;
/* lxcFuseRun thread create success */
}
}
#else
-int lxcSetupFuse(struct virLXCFuse **f G_GNUC_UNUSED,
- virDomainDef *def G_GNUC_UNUSED)
+int
+lxcSetupFuse(struct virLXCFuse **f G_GNUC_UNUSED,
+ virDomainDef *def G_GNUC_UNUSED)
{
return 0;
}
-int lxcStartFuse(struct virLXCFuse *f G_GNUC_UNUSED)
+int
+lxcStartFuse(struct virLXCFuse *f G_GNUC_UNUSED)
{
return 0;
}
-void lxcFreeFuse(struct virLXCFuse **f G_GNUC_UNUSED)
+void
+lxcFreeFuse(struct virLXCFuse **f G_GNUC_UNUSED)
{
}
#endif