From e244c93d21bcacf1a0eedefdcc3018a362274796 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 00:13:02 +0200 Subject: Adding upstream version 0.36. Signed-off-by: Daniel Baumann --- src/nwipe.h | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 src/nwipe.h (limited to 'src/nwipe.h') diff --git a/src/nwipe.h b/src/nwipe.h new file mode 100644 index 0000000..4f1c495 --- /dev/null +++ b/src/nwipe.h @@ -0,0 +1,114 @@ +/*. + * nwipe.h: The header file of the nwipe program. + * + * Copyright Darik Horn . + * + * Modifications to original dwipe Copyright Andy Beverley + * + * This program 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, version 2. + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#ifndef NWIPE_H_ +#define NWIPE_H_ + +/* Function prototypes */ +int cleanup(); +void check_for_autopoweroff( void ); +void* signal_hand( void* ); + +#ifndef _LARGEFILE64_SOURCE +#define _LARGEFILE64_SOURCE +#endif + +#ifndef _FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 +#endif + +/* Busybox headers. */ +#ifdef BB_VER +#include "busybox.h" +#endif + +/* System headers. */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* workaround for Fedora */ +#ifndef off64_t +#ifndef off_t +#define off64_t int64_t +#else +#define off64_t off_t +#endif +#endif + +/*#include "config.h"*/ + +/* System errors. */ +extern int errno; + +/* 0=wipe not yet started, 1=wipe has been started by the user */ +extern int global_wipe_status; + +/* Ncurses headers. */ +#ifdef NCURSES_IN_SUBDIR +#include +#else +#include +#endif +#ifdef PANEL_IN_SUBDIR +#include +#else +#include +#endif + +/* Kernel device headers. */ +#include + +/* These types are usually defined in for __KERNEL__ code. */ +typedef unsigned long long u64; +typedef unsigned long u32; +typedef unsigned short u16; +typedef unsigned char u8; + +/* This is required for ioctl BLKGETSIZE64, but it conflicts with . */ +/* #include */ + +/* Define ioctls that cannot be included. */ +#define BLKSSZGET _IO( 0x12, 104 ) +#define BLKBSZGET _IOR( 0x12, 112, size_t ) +#define BLKBSZSET _IOW( 0x12, 113, size_t ) +#define BLKGETSIZE64 _IOR( 0x12, 114, sizeof( u64 ) ) + +#define THREAD_CANCELLATION_TIMEOUT 10 + +/* This is required for ioctl FDFLUSH. */ +#include + +#endif /* NWIPE_H_ */ -- cgit v1.2.3