summaryrefslogtreecommitdiff
path: root/util/nvmutil/nvmutil.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/nvmutil/nvmutil.h')
-rw-r--r--util/nvmutil/nvmutil.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/util/nvmutil/nvmutil.h b/util/nvmutil/nvmutil.h
index d02d2d7f..a5d5e98f 100644
--- a/util/nvmutil/nvmutil.h
+++ b/util/nvmutil/nvmutil.h
@@ -9,6 +9,11 @@
check_cmd(cmd_helper_cat);
*/
+/*
+ * system prototypes
+ */
+int fchmod(int fd, mode_t mode);
+
#ifndef NVMUTIL_H
#define NVMUTIL_H
@@ -23,6 +28,14 @@
#define OFF_RESET 1
#endif
+#ifndef S_ISVTX
+#define S_ISVTX 01000
+#endif
+
+#if defined(S_IFMT) && ((S_ISVTX & S_IFMT) != 0)
+#error "Unexpected bit layout"
+#endif
+
#ifndef MAX_ZERO_RW_RETRY
#define MAX_ZERO_RW_RETRY 5
#endif
@@ -31,6 +44,10 @@
#define HAVE_REAL_PREAD_PWRITE 0
#endif
+#ifndef MAX_EAGAIN_RETRIES
+#define MAX_EAGAIN_RETRIES 100000
+#endif
+
#ifndef LOOP_EAGAIN
#define LOOP_EAGAIN 1
#endif
@@ -215,14 +232,6 @@
#define SKIP_CHECKSUM_WRITE 0
#define CHECKSUM_WRITE 1
-/*
- * portable timeval
- */
-struct x_st_timeval {
- long tv_sec;
- long tv_usec;
-};
-
struct commands {
unsigned long chk;
char *str;
@@ -280,7 +289,7 @@ struct xfile {
/*
* BE CAREFUL when editing this
* to ensure that you also update
- * the tables in new_xstate()
+ * the tables in xstatus()
*/
struct xstate {
struct commands cmd[7];
@@ -304,7 +313,7 @@ struct xstate {
-static struct xstate *new_xstate(void);
+static struct xstate *xstatus(void);
/*
* Sanitize command tables.
@@ -357,8 +366,6 @@ void set_mac_nib(unsigned long mac_str_pos,
unsigned long mac_byte_pos, unsigned long mac_nib_pos);
unsigned short hextonum(char ch_s);
unsigned long rlong(void);
-unsigned long entropy_jitter(void);
-int x_i_gettimeofday(struct x_st_timeval *tv, void *tz);
void write_mac_part(unsigned long partnum);
/*
@@ -389,6 +396,7 @@ void cat(unsigned long nff);
void cat_buf(unsigned char *b);
void check_cmd(void (*fn)(void), const char *name);
+void cmd_helper_err(void);
/*
* After command processing, write
@@ -473,11 +481,6 @@ void *x_v_memcpy(void *dst,
const void *src, unsigned long n);
int x_i_memcmp(const void *a,
const void *b, unsigned long n);
-int x_i_fchmod(int fd, mode_t mode);
-int x_try_fdpath(const char *prefix,
- int fd, mode_t mode);
-unsigned long x_conv_fd(char *buf,
- unsigned long n);
int x_i_fsync(int fd);