/*## (c) SECURITY EXPLORATIONS    2018 poland                                #*/
/*##     http://www.security-explorations.com                                #*/

/* THIS SOFTWARE IS PROTECTED BY DOMESTIC AND INTERNATIONAL COPYRIGHT LAWS    */
/* UNAUTHORISED COPYING OF THIS SOFTWARE IN EITHER SOURCE OR BINARY FORM IS   */
/* EXPRESSLY FORBIDDEN. ANY USE, INCLUDING THE REPRODUCTION, MODIFICATION,    */
/* DISTRIBUTION, TRANSMISSION, RE-PUBLICATION, STORAGE OR DISPLAY OF ANY      */
/* PART OF THE SOFTWARE, FOR COMMERCIAL OR ANY OTHER PURPOSES REQUIRES A      */
/* VALID LICENSE FROM THE COPYRIGHT HOLDER.                                   */

/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS    */
/* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,*/
/* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    */
/* SECURITY EXPLORATIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, */
/* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF  */
/* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE     */
/* SOFTWARE.                                                                  */

import java.lang.*;
import java.util.*;
import java.io.*;

public class FSDefs {
 public static final int MAXPATH     = 1024;

 public static final int STATBUFSIZE = 16*4;
 public static final int DIRBUFSIZE  = 0x8000;
 public static final int BUFSIZE     = 0x800;

 public static final int JVM_DIR_PAD = 60;
 public static final int SYS_DIR_PAD = 40;

 public static final int SYS_USR_PAD = 6;

 public static final int MAX_ZERO_READ = 10;

 public static final int MAX_FILE_SIZE = 0x3000000;

 public static final int S_IFMT	   = 0170000;

 public static final int S_IFLNK   = 0120000;
 public static final int S_IFREG   = 0100000;
 public static final int S_IFBLK   = 0060000;
 public static final int S_IFDIR   = 0040000;
 public static final int S_IFCHR   = 0020000;
 public static final int S_IFIFO   = 0010000;
 public static final int S_ISUID   = 0004000;
 public static final int S_ISGID   = 0002000;

 public static final int DEFAULT_MODE = 0666;

 /* open and lseek constants                 */
 public static final int SEEK_SET  = 0;
 public static final int SEEK_CUR  = 1;
 public static final int SEEK_END  = 2;

 public static final int O_RDONLY  = 0x00000000;
 public static final int O_WRONLY  = 0x00000001;
 public static final int O_RDWR    = 0x00000002;
 public static final int O_APPEND  = 0x00000400;

 /* error codes                              */
 public static final int FGET_OK            = 0;
 public static final int FGET_CANNOT_OPEN   = 1;
 public static final int FGET_ZERO_LENGTH   = 2;
 public static final int FGET_NO_MORE_FILES = 3;
 public static final int FGET_DIR           = 4;

 public static final int FPUT_OK            = 0;
 public static final int FPUT_CANNOT_WRITE  = 1;
 public static final int FPUT_EXISTS        = 2;
 public static final int FPUT_CANNOT_OPEN   = 3;
 public static final int FPUT_DIR           = 4;
}
