17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*fe0e7ec4Smaheshvs * Common Development and Distribution License (the "License"). 6*fe0e7ec4Smaheshvs * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*fe0e7ec4Smaheshvs * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 23*fe0e7ec4Smaheshvs * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _DUMPUSG_H 277c478bd9Sstevel@tonic-gate #define _DUMPUSG_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate /* 307c478bd9Sstevel@tonic-gate * Translate from BSD to System V, where possible. 317c478bd9Sstevel@tonic-gate */ 327c478bd9Sstevel@tonic-gate /* 337c478bd9Sstevel@tonic-gate * System-V specific header files 347c478bd9Sstevel@tonic-gate */ 357c478bd9Sstevel@tonic-gate #include <netdb.h> 367c478bd9Sstevel@tonic-gate #include <stdlib.h> 377c478bd9Sstevel@tonic-gate #include <unistd.h> 387c478bd9Sstevel@tonic-gate #include <sys/utsname.h> 397c478bd9Sstevel@tonic-gate #include <sys/statvfs.h> 407c478bd9Sstevel@tonic-gate #include <sys/systeminfo.h> 417c478bd9Sstevel@tonic-gate #include <sys/vfstab.h> 427c478bd9Sstevel@tonic-gate #include <sys/fs/ufs_inode.h> 437c478bd9Sstevel@tonic-gate #include <sys/fs/ufs_fs.h> 447c478bd9Sstevel@tonic-gate #include <sys/fs/ufs_fsdir.h> 457c478bd9Sstevel@tonic-gate #include <sys/fs/ufs_acl.h> 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gate #include <sys/mnttab.h> 487c478bd9Sstevel@tonic-gate #include <sys/vfstab.h> 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gate #ifdef __cplusplus 517c478bd9Sstevel@tonic-gate extern "C" { 527c478bd9Sstevel@tonic-gate #endif 537c478bd9Sstevel@tonic-gate 547c478bd9Sstevel@tonic-gate /* 557c478bd9Sstevel@tonic-gate * make mnttab look like mtab 567c478bd9Sstevel@tonic-gate */ 577c478bd9Sstevel@tonic-gate #define MOUNTED MNTTAB 587c478bd9Sstevel@tonic-gate #define mntent mnttab 597c478bd9Sstevel@tonic-gate #define mnt_fsname mnt_special 607c478bd9Sstevel@tonic-gate #define mnt_dir mnt_mountp 617c478bd9Sstevel@tonic-gate #define mnt_type mnt_fstype 627c478bd9Sstevel@tonic-gate #define mnt_opts mnt_mntopts 637c478bd9Sstevel@tonic-gate #define MNTTYPE_42 "ufs" 647c478bd9Sstevel@tonic-gate #define MNTINFO_DEV "dev" 657c478bd9Sstevel@tonic-gate 667c478bd9Sstevel@tonic-gate #define setmntent fopen 677c478bd9Sstevel@tonic-gate #define endmntent fclose 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gate /* 707c478bd9Sstevel@tonic-gate * Function translations 717c478bd9Sstevel@tonic-gate */ 727c478bd9Sstevel@tonic-gate #define gethostname(name, len) \ 737c478bd9Sstevel@tonic-gate ((sysinfo(SI_HOSTNAME, (name), (len)) < 0) ? -1 : 0) 747c478bd9Sstevel@tonic-gate #define signal nsignal /* defined in dumpmain.c */ 757c478bd9Sstevel@tonic-gate #define sigvec sigaction /* both struct and func */ 767c478bd9Sstevel@tonic-gate #define sv_flags sa_flags 777c478bd9Sstevel@tonic-gate #define sv_handler sa_handler 787c478bd9Sstevel@tonic-gate #define sv_mask sa_mask 797c478bd9Sstevel@tonic-gate #define sigmask(x) x 807c478bd9Sstevel@tonic-gate #define setreuid(r, e) seteuid(e) 817c478bd9Sstevel@tonic-gate #define statfs statvfs /* both struct and func */ 82*fe0e7ec4Smaheshvs #undef setjmp 837c478bd9Sstevel@tonic-gate #define setjmp(b) sigsetjmp((b), 1) 847c478bd9Sstevel@tonic-gate #define longjmp siglongjmp 857c478bd9Sstevel@tonic-gate #define jmp_buf sigjmp_buf 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate #if !__STDC__ 887c478bd9Sstevel@tonic-gate extern int seteuid(); 897c478bd9Sstevel@tonic-gate #endif 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gate /* 927c478bd9Sstevel@tonic-gate * Inode related translations 937c478bd9Sstevel@tonic-gate */ 947c478bd9Sstevel@tonic-gate #define ROOTINO UFSROOTINO 957c478bd9Sstevel@tonic-gate #define di_rdev di_ordev 967c478bd9Sstevel@tonic-gate 977c478bd9Sstevel@tonic-gate /* 987c478bd9Sstevel@tonic-gate * For stat-inode translation. 997c478bd9Sstevel@tonic-gate * Don't forget the translation from 1007c478bd9Sstevel@tonic-gate * nanosecs to usecs (or vica versa) 1017c478bd9Sstevel@tonic-gate */ 1027c478bd9Sstevel@tonic-gate #define st_spare1 st_atim.tv_nsec 1037c478bd9Sstevel@tonic-gate #define st_spare2 st_mtim.tv_nsec 1047c478bd9Sstevel@tonic-gate #define st_spare3 st_ctim.tv_nsec 1057c478bd9Sstevel@tonic-gate 1067c478bd9Sstevel@tonic-gate #define TMCONV 1000 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1097c478bd9Sstevel@tonic-gate } 1107c478bd9Sstevel@tonic-gate #endif 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate #endif /* _DUMPUSG_H */ 113