File: sysfs-utils.h

package info (click to toggle)
btrfs-progs 6.17.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,612 kB
  • sloc: ansic: 127,282; sh: 7,915; python: 1,384; makefile: 900; asm: 296
file content (35 lines) | stat: -rw-r--r-- 1,379 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public
 * License v2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public
 * License along with this program; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 021110-1307, USA.
 */

#ifndef __COMMON_SYSFS_UTILS__
#define __COMMON_SYSFS_UTILS__

#include "kerncompat.h"
#include <stddef.h>

int sysfs_open_file(const char *name);
int sysfs_open_file_rw(const char *name);
int sysfs_open_fsid_file(int fd, const char *filename);
int sysfs_open_fsid_file_rw(int fd, const char *filename);
int sysfs_open_fsid_dir(int fd, const char *dirname);
int sysfs_read_fsid_file_u64(int fd, const char *name, u64 *value);
int sysfs_write_fsid_file_u64(int fd, const char *name, u64 value);
int sysfs_read_file(int fd, char *buf, size_t size);
int sysfs_write_file(int fd, const char *buf, size_t size);
int sysfs_read_file_u64(const char *name, u64 *value);
int sysfs_write_file_u64(const char *name, u64 value);

#endif