1c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross/* 2c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * Copyright (C) 2010 The Android Open Source Project 3c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * 4c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * Licensed under the Apache License, Version 2.0 (the "License"); 5c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * you may not use this file except in compliance with the License. 6c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * You may obtain a copy of the License at 7c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * 8c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * http://www.apache.org/licenses/LICENSE-2.0 9c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * 10c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * Unless required by applicable law or agreed to in writing, software 11c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * distributed under the License is distributed on an "AS IS" BASIS, 12c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * See the License for the specific language governing permissions and 14c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross * limitations under the License. 15c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross */ 16c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross 17c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross#ifndef _WIPE_H_ 18c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross#define _WIPE_H_ 19c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross 206e6085030ef4900c2b944b6a710e05a470c69660Szymon Starzycki#include "ext4_utils.h" 216e6085030ef4900c2b944b6a710e05a470c69660Szymon Starzycki 22eb5fcc3e932a8ccac1b580788a213c7782aff31bDavid 'Digit' Turner/* Set WIPE_IS_SUPPORTED to 1 if the current platform supports 23eb5fcc3e932a8ccac1b580788a213c7782aff31bDavid 'Digit' Turner * wiping of block devices. 0 otherwise. For now, only Linux does. 24eb5fcc3e932a8ccac1b580788a213c7782aff31bDavid 'Digit' Turner */ 25eb5fcc3e932a8ccac1b580788a213c7782aff31bDavid 'Digit' Turner#ifdef __linux__ 26eb5fcc3e932a8ccac1b580788a213c7782aff31bDavid 'Digit' Turner# define WIPE_IS_SUPPORTED 1 27eb5fcc3e932a8ccac1b580788a213c7782aff31bDavid 'Digit' Turner#else 28eb5fcc3e932a8ccac1b580788a213c7782aff31bDavid 'Digit' Turner# define WIPE_IS_SUPPORTED 0 29eb5fcc3e932a8ccac1b580788a213c7782aff31bDavid 'Digit' Turner#endif 30eb5fcc3e932a8ccac1b580788a213c7782aff31bDavid 'Digit' Turner 3161d6591c827dbea6db9bd29b17a5679d6e2c0d50Ken Sumrallint wipe_block_device(int fd, s64 len); 32c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross 33c2470654d4b4db09a7052fc5fa108ac21f1b1948Colin Cross#endif 34