Skip to contentSkip to conversation

nilfs-utils: fsck: add libfsck.la library into nilfs-utils package

PATCH New Vyacheslav Dubeyko 1 participant 1 message Nov 12, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 3/15 nilfs-utils: fsck: add libfsck.la library into nilfs-utils package

Hi,

This patch adds libfsck.la library into nilfs-utils package. The library has purpose to encapsulate common functionality of fsck.

With the best regards,
Vyacheslav Dubeyko.
--
From: Vyacheslav Dubeyko <[email protected]>
Subject: [PATCH v4 03/15] nilfs-utils: fsck: add libfsck.la library into nilfs-utils package

This patch adds libfsck.la library into nilfs-utils package. The library has purpose to encapsulate common functionality of fsck.

---
 include/fsck_raw_ops.h |   55 ++++++
 lib/fsck_raw_ops.c     |  467 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 522 insertions(+)
 create mode 100644 include/fsck_raw_ops.h
 create mode 100644 lib/fsck_raw_ops.c
include/fsck_raw_ops.h new file +55 -0
new file mode 100644
index 0000000..5d2ee48
@@ -0,0 +1,55 @@
+/*
+ * fsck_raw_ops.h - Declarations for raw operations with disk
+ *
+ * Copyright (C) 2012 Vyacheslav Dubeyko <[email protected]>
+ *
+ * This file is part of NILFS.
+ *
+ * NILFS is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * NILFS 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 NILFS; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ * Written by Vyacheslav Dubeyko <[email protected]>
+ */
+
+#ifndef FSCK_RAW_OPS_H
+#define FSCK_RAW_OPS_H
+
+/* Open volume for fsck operations */
+int open_volume(const char *device_name);
+
+/* Get file descriptor of opened volume */
+int device_file_descriptor(void);
+
+/* Close volume after fsck operations */
+int close_volume(void);
+
+/* Return device sector size in bytes */
+int get_device_sector_size(void);
+
+/* Return device size in bytes */
+__u64 get_device_size_in_bytes(void);
+
+/* Read bytes from volume */
+int read_raw_bytes(__u64 device_offset,
+			void *raw_data_buffer,
+			__u32 requested_bytes_count,
+			__u32 *read_bytes_count);
+
+/* Write bytes to volume */
+int write_raw_bytes(__u64 device_offset,
+			void *raw_data_buffer,
+			__u32 requested_bytes_count,
+			__u32 *written_bytes_count);
+
+#endif /* FSCK_RAW_OPS_H */
lib/fsck_raw_ops.c new file +467 -0

467 lines not on this page · raw message

Signature · 8 lines
1.7.9.5



--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html