10Sstevel@tonic-gate /* 20Sstevel@tonic-gate * CDDL HEADER START 30Sstevel@tonic-gate * 40Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*1053Smaheshvs * Common Development and Distribution License (the "License"). 6*1053Smaheshvs * You may not use this file except in compliance with the License. 70Sstevel@tonic-gate * 80Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 90Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 100Sstevel@tonic-gate * See the License for the specific language governing permissions 110Sstevel@tonic-gate * and limitations under the License. 120Sstevel@tonic-gate * 130Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 140Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 150Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 160Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 170Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 180Sstevel@tonic-gate * 190Sstevel@tonic-gate * CDDL HEADER END 200Sstevel@tonic-gate */ 210Sstevel@tonic-gate /* 22*1053Smaheshvs * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 23*1053Smaheshvs * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 260Sstevel@tonic-gate #ifndef _DUMPUSG_H 270Sstevel@tonic-gate #define _DUMPUSG_H 280Sstevel@tonic-gate 290Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 300Sstevel@tonic-gate 310Sstevel@tonic-gate /* 320Sstevel@tonic-gate * Translate from BSD to System V, where possible. 330Sstevel@tonic-gate */ 340Sstevel@tonic-gate /* 350Sstevel@tonic-gate * System-V specific header files 360Sstevel@tonic-gate */ 370Sstevel@tonic-gate #include <netdb.h> 380Sstevel@tonic-gate #include <stdlib.h> 390Sstevel@tonic-gate #include <unistd.h> 400Sstevel@tonic-gate #include <sys/utsname.h> 410Sstevel@tonic-gate #include <sys/statvfs.h> 420Sstevel@tonic-gate #include <sys/systeminfo.h> 430Sstevel@tonic-gate #include <sys/vfstab.h> 440Sstevel@tonic-gate #include <sys/fs/ufs_inode.h> 450Sstevel@tonic-gate #include <sys/fs/ufs_fs.h> 460Sstevel@tonic-gate #include <sys/fs/ufs_fsdir.h> 470Sstevel@tonic-gate #include <sys/fs/ufs_acl.h> 480Sstevel@tonic-gate 490Sstevel@tonic-gate #include <sys/mnttab.h> 500Sstevel@tonic-gate #include <sys/vfstab.h> 510Sstevel@tonic-gate 520Sstevel@tonic-gate #ifdef __cplusplus 530Sstevel@tonic-gate extern "C" { 540Sstevel@tonic-gate #endif 550Sstevel@tonic-gate 560Sstevel@tonic-gate /* 570Sstevel@tonic-gate * make mnttab look like mtab 580Sstevel@tonic-gate */ 590Sstevel@tonic-gate #define MOUNTED MNTTAB 600Sstevel@tonic-gate #define mntent mnttab 610Sstevel@tonic-gate #define mnt_fsname mnt_special 620Sstevel@tonic-gate #define mnt_dir mnt_mountp 630Sstevel@tonic-gate #define mnt_type mnt_fstype 640Sstevel@tonic-gate #define mnt_opts mnt_mntopts 650Sstevel@tonic-gate #define MNTTYPE_42 "ufs" 660Sstevel@tonic-gate #define MNTINFO_DEV "dev" 670Sstevel@tonic-gate 680Sstevel@tonic-gate #define setmntent fopen 690Sstevel@tonic-gate #define endmntent fclose 700Sstevel@tonic-gate 710Sstevel@tonic-gate /* 720Sstevel@tonic-gate * Function translations 730Sstevel@tonic-gate */ 740Sstevel@tonic-gate #define gethostname(name, len) \ 750Sstevel@tonic-gate ((sysinfo(SI_HOSTNAME, (name), (len)) < 0) ? -1 : 0) 760Sstevel@tonic-gate #define signal nsignal /* defined in dumpmain.c */ 770Sstevel@tonic-gate #define sigvec sigaction /* both struct and func */ 780Sstevel@tonic-gate #define sv_flags sa_flags 790Sstevel@tonic-gate #define sv_handler sa_handler 800Sstevel@tonic-gate #define sv_mask sa_mask 810Sstevel@tonic-gate #define sigmask(x) x 820Sstevel@tonic-gate #define setreuid(r, e) seteuid(e) 830Sstevel@tonic-gate #define statfs statvfs /* both struct and func */ 84*1053Smaheshvs #undef setjmp 850Sstevel@tonic-gate #define setjmp(b) sigsetjmp((b), 1) 860Sstevel@tonic-gate #define longjmp siglongjmp 870Sstevel@tonic-gate #define jmp_buf sigjmp_buf 880Sstevel@tonic-gate 890Sstevel@tonic-gate #if !__STDC__ 900Sstevel@tonic-gate extern int seteuid(); 910Sstevel@tonic-gate #endif 920Sstevel@tonic-gate 930Sstevel@tonic-gate /* 940Sstevel@tonic-gate * Inode related translations 950Sstevel@tonic-gate */ 960Sstevel@tonic-gate #define ROOTINO UFSROOTINO 970Sstevel@tonic-gate #define di_rdev di_ordev 980Sstevel@tonic-gate 990Sstevel@tonic-gate /* 1000Sstevel@tonic-gate * For stat-inode translation. 1010Sstevel@tonic-gate * Don't forget the translation from 1020Sstevel@tonic-gate * nanosecs to usecs (or vica versa) 1030Sstevel@tonic-gate */ 1040Sstevel@tonic-gate #define st_spare1 st_atim.tv_nsec 1050Sstevel@tonic-gate #define st_spare2 st_mtim.tv_nsec 1060Sstevel@tonic-gate #define st_spare3 st_ctim.tv_nsec 1070Sstevel@tonic-gate 1080Sstevel@tonic-gate #define TMCONV 1000 1090Sstevel@tonic-gate 1100Sstevel@tonic-gate #ifdef __cplusplus 1110Sstevel@tonic-gate } 1120Sstevel@tonic-gate #endif 1130Sstevel@tonic-gate 1140Sstevel@tonic-gate #endif /* _DUMPUSG_H */ 115