sel_subs.h revision 50471
138494Sobrien/*- 238494Sobrien * Copyright (c) 1992 Keith Muller. 338494Sobrien * Copyright (c) 1992, 1993 438494Sobrien * The Regents of the University of California. All rights reserved. 538494Sobrien * 638494Sobrien * This code is derived from software contributed to Berkeley by 738494Sobrien * Keith Muller of the University of California, San Diego. 838494Sobrien * 938494Sobrien * Redistribution and use in source and binary forms, with or without 1038494Sobrien * modification, are permitted provided that the following conditions 1138494Sobrien * are met: 1238494Sobrien * 1. Redistributions of source code must retain the above copyright 1338494Sobrien * notice, this list of conditions and the following disclaimer. 1438494Sobrien * 2. Redistributions in binary form must reproduce the above copyright 1538494Sobrien * notice, this list of conditions and the following disclaimer in the 1638494Sobrien * documentation and/or other materials provided with the distribution. 1738494Sobrien * 3. All advertising materials mentioning features or use of this software 1838494Sobrien * must display the following acknowledgement: 1938494Sobrien * This product includes software developed by the University of 2038494Sobrien * California, Berkeley and its contributors. 2138494Sobrien * 4. Neither the name of the University nor the names of its contributors 2238494Sobrien * may be used to endorse or promote products derived from this software 2338494Sobrien * without specific prior written permission. 2438494Sobrien * 2538494Sobrien * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 2638494Sobrien * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2738494Sobrien * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2838494Sobrien * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2938494Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 3038494Sobrien * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 3138494Sobrien * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 3238494Sobrien * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 3341142Sobrien * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3441142Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3551292Sobrien * SUCH DAMAGE. 3651292Sobrien * 3751292Sobrien * @(#)sel_subs.h 8.1 (Berkeley) 5/31/93 3851292Sobrien * $FreeBSD: head/bin/pax/sel_subs.h 50471 1999-08-27 23:15:48Z peter $ 3938494Sobrien */ 4038494Sobrien 4138494Sobrien/* 4238494Sobrien * data structure for storing uid/grp selects (-U, -G non standard options) 4338494Sobrien */ 4438494Sobrien 4538494Sobrien#define USR_TB_SZ 317 /* user selection table size */ 4638494Sobrien#define GRP_TB_SZ 317 /* user selection table size */ 4738494Sobrien 4838494Sobrientypedef struct usrt { 4938494Sobrien uid_t uid; 5038494Sobrien struct usrt *fow; /* next uid */ 5138494Sobrien} USRT; 5238494Sobrien 5338494Sobrientypedef struct grpt { 5438494Sobrien gid_t gid; 5538494Sobrien struct grpt *fow; /* next gid */ 5638494Sobrien} GRPT; 5738494Sobrien 5838494Sobrien/* 5938494Sobrien * data structure for storing user supplied time ranges (-T option) 6038494Sobrien */ 6138494Sobrien 6238494Sobrien#define ATOI2(s) ((((s)[0] - '0') * 10) + ((s)[1] - '0')) 6338494Sobrien 6438494Sobrientypedef struct time_rng { 6538494Sobrien time_t low_time; /* lower inclusive time limit */ 6638494Sobrien time_t high_time; /* higher inclusive time limit */ 6738494Sobrien int flgs; /* option flags */ 6838494Sobrien#define HASLOW 0x01 /* has lower time limit */ 6938494Sobrien#define HASHIGH 0x02 /* has higher time limit */ 7038494Sobrien#define CMPMTME 0x04 /* compare file modification time */ 7138494Sobrien#define CMPCTME 0x08 /* compare inode change time */ 7238494Sobrien#define CMPBOTH (CMPMTME|CMPCTME) /* compare inode and mod time */ 7338494Sobrien struct time_rng *fow; /* next pattern */ 7438494Sobrien} TIME_RNG; 7538494Sobrien