[FIX] correct handling of do_munmap()
[kernel/swap-modules.git] / driver / swap_driver_errors.h
1 /*
2  *  SWAP Driver Module
3  *  modules/buffer/swap_driver_errors.h
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18  *
19  * Copyright (C) Samsung Electronics, 2013
20  *
21  * 2013  Alexander Aksenov <a.aksenov@samsung.com>: SWAP Driver implement
22  *
23  */
24
25 #ifndef __SWAP_DRIVER_ERRORS_H__
26 #define __SWAP_DRIVER_ERRORS_H__
27
28 /* SWAP Driver error codes enumeration */
29
30 enum _swap_driver_errors {
31         E_SD_SUCCESS = 0,                  /* Success */
32         E_SD_ALLOC_CHRDEV_FAIL = 1,      /* alloc_chrdev_region failed */
33         E_SD_CDEV_ALLOC_FAIL = 2,          /* cdev_alloc failed */
34         E_SD_CDEV_ADD_FAIL = 3,  /* cdev_add failed */
35         E_SD_CLASS_CREATE_FAIL = 4,      /* class_create failed */
36         E_SD_DEVICE_CREATE_FAIL = 5,    /* device_create failed */
37         E_SD_NO_SPLICE_FUNCS = 6,          /* splice_* funcs not found */
38         E_SD_NO_DATA_TO_READ = 7,          /* swap_buffer_get tells us that there is no
39                                            readable subbuffers */
40         E_SD_NO_BUSY_SUBBUFFER = 8,      /* No busy subbuffer */
41         E_SD_WRONG_SUBBUFFER_PTR = 9,   /* Wrong subbuffer pointer passed to
42                                            swap_buffer module */
43         E_SD_BUFFER_ERROR = 10,  /* Unhandled swap_buffer error */
44         E_SD_WRITE_ERROR = 11,    /* Write to subbuffer error */
45         E_SD_WRONG_ARGS = 12,      /* Arguments, passed to the func, doesn't 
46                                            pass sanity check */
47         E_SD_NO_MEMORY = 13,            /* No memory to allocate */
48         E_SD_UNINIT_ERROR = 14    /* swap_buffer uninitialization error */
49 };
50
51 #endif /* __SWAP_DRIVER_ERRORS_H__ */