Select Git revision
helper_functions.py
Forked from
Gregory Ashton / PyFstat
Source project has a limited visibility.
-
Gregory Ashton authored
1) Adds 'add_noise' option (defaults to true) 2) Better checking of Writer for if all glitch parameters have the same length (avoid strange errors) 3) Fixes issue in which the tqdm ignore command was itself ignored
Gregory Ashton authored1) Adds 'add_noise' option (defaults to true) 2) Better checking of Writer for if all glitch parameters have the same length (avoid strange errors) 3) Fixes issue in which the tqdm ignore command was itself ignored
os_linux.cpp 101.98 KiB
/*
* os_linux.cpp
*
* Home page of code is: http://smartmontools.sourceforge.net
*
* Copyright (C) 2003-10 Bruce Allen <smartmontools-support@lists.sourceforge.net>
* Copyright (C) 2003-10 Doug Gilbert <dougg@torque.net>
* Copyright (C) 2008 Hank Wu <hank@areca.com.tw>
* Copyright (C) 2008 Oliver Bock <brevilo@users.sourceforge.net>
* Copyright (C) 2008-10 Christian Franke <smartmontools-support@lists.sourceforge.net>
* Copyright (C) 2008 Jordan Hargrave <jordan_hargrave@dell.com>
*
* Parts of this file are derived from code that was
*
* Written By: Adam Radford <linux@3ware.com>
* Modifications By: Joel Jacobson <linux@3ware.com>
* Arnaldo Carvalho de Melo <acme@conectiva.com.br>
* Brad Strand <linux@3ware.com>
*
* Copyright (C) 1999-2003 3ware Inc.
*
* Kernel compatablity By: Andre Hedrick <andre@suse.com>
* Non-Copyright (C) 2000 Andre Hedrick <andre@suse.com>
*
* Other ars of this file are derived from code that was
*
* Copyright (C) 1999-2000 Michael Cornwell <cornwell@acm.org>
* Copyright (C) 2000 Andre Hedrick <andre@linux-ide.org>
*
* 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; either version 2, or (at your option)
* any later version.
*
* You should have received a copy of the GNU General Public License
* (for example COPYING); If not, see <http://www.gnu.org/licenses/>.
*
* This code was originally developed as a Senior Thesis by Michael Cornwell
* at the Concurrent Systems Laboratory (now part of the Storage Systems
* Research Center), Jack Baskin School of Engineering, University of
* California, Santa Cruz. http://ssrc.soe.ucsc.edu/
*
*/
// This file contains the linux-specific IOCTL parts of
// smartmontools. It includes one interface routine for ATA devices,
// one for SCSI devices, and one for ATA devices behind escalade
// controllers.
#include "config.h"
#include <errno.h>
#include <fcntl.h>
#include <glob.h>
#include <scsi/scsi.h>
#include <scsi/scsi_ioctl.h>
#include <scsi/sg.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <unistd.h>
#include <sys/uio.h>
#include <sys/types.h>
#ifndef makedev // old versions of types.h do not include sysmacros.h
#include <sys/sysmacros.h>
#endif
#ifdef WITH_SELINUX