• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/fstools/libfstools/libfstools.h

  1 /*
  2  * Copyright (C) 2014 John Crispin <blogic@openwrt.org>
  3  *
  4  * This program is free software; you can redistribute it and/or modify
  5  * it under the terms of the GNU Lesser General Public License version 2.1
  6  * as published by the Free Software Foundation
  7  *
  8  * This program is distributed in the hope that it will be useful,
  9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 11  * GNU General Public License for more details.
 12  */
 13 
 14 #ifndef _FS_STATE_H__
 15 #define _FS_STATE_H__
 16 
 17 #include <libubox/list.h>
 18 #include <libubox/blob.h>
 19 #include <libubox/ulog.h>
 20 #include <libubox/utils.h>
 21 
 22 struct volume;
 23 
 24 enum {
 25         FS_NONE,
 26         FS_SNAPSHOT,
 27         FS_JFFS2,
 28         FS_DEADCODE,
 29         FS_UBIFS,
 30         FS_F2FS,
 31         FS_EXT4,
 32         FS_TARGZ,
 33 };
 34 
 35 enum fs_state {
 36         FS_STATE_UNKNOWN,
 37         FS_STATE_PENDING,
 38         FS_STATE_READY,
 39         __FS_STATE_LAST = FS_STATE_READY,
 40 };
 41 
 42 extern int mount_extroot(char const *extroot_prefix);
 43 extern int mount_snapshot(struct volume *v);
 44 extern int mount_overlay(struct volume *v);
 45 
 46 extern int mount_move(const char *oldroot, const char *newroot, const char *dir);
 47 extern int pivot(char *new, char *old);
 48 extern int fopivot(char *rw_root, char *ro_root);
 49 extern int ramoverlay(void);
 50 
 51 extern int find_overlay_mount(char *overlay);
 52 extern char* find_mount(char *mp);
 53 extern char* find_mount_point(char *block, int root_only);
 54 extern int find_filesystem(char *fs);
 55 
 56 extern int jffs2_switch(struct volume *v);
 57 
 58 extern int handle_whiteout(const char *dir);
 59 extern void foreachdir(const char *dir, int (*cb)(const char*));
 60 
 61 extern void overlay_delete(const char *dir, bool keep_sysupgrade);
 62 
 63 enum fs_state fs_state_get(const char *dir);
 64 int fs_state_set(const char *dir, enum fs_state state);
 65 void selinux_restorecon(char *overlaydir);
 66 
 67 #endif
 68 

This page was automatically generated by LXR 0.3.1.  •  OpenWrt