60 lines
1.6 KiB
C
60 lines
1.6 KiB
C
|
|
/*
|
|||
|
|
$Id: xa.c,v 1.1 2003/08/31 08:32:40 rocky Exp $
|
|||
|
|
|
|||
|
|
Copyright (C) 2000 Herbert Valerio Riedel <hvr@gnu.org>
|
|||
|
|
Copyright (C) 2003 Rocky Bernstein <rocky@panix.com>
|
|||
|
|
|
|||
|
|
This program is free software; you can redistribute it and/or modify
|
|||
|
|
it under the terms of the GNU General Public License as published by
|
|||
|
|
the Free Software Foundation; either version 2 of the License, or
|
|||
|
|
(at your option) any later version.
|
|||
|
|
|
|||
|
|
This program is distributed in the hope that it will be useful,
|
|||
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|||
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||
|
|
GNU General Public License for more details.
|
|||
|
|
|
|||
|
|
You should have received a copy of the GNU General Public License
|
|||
|
|
along with this program; if not, write to the Free Software
|
|||
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
|
|||
|
|
#ifdef HAVE_CONFIG_H
|
|||
|
|
# include "config.h"
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
/* Public headers */
|
|||
|
|
#include <cdio/iso9660.h>
|
|||
|
|
#include <cdio/util.h>
|
|||
|
|
|
|||
|
|
/* Private headers */
|
|||
|
|
#include "cdio_assert.h"
|
|||
|
|
#include "bytesex.h"
|
|||
|
|
|
|||
|
|
#define iso9660_xa_t_SIZEOF 14
|
|||
|
|
|
|||
|
|
iso9660_xa_t *
|
|||
|
|
iso9660_xa_init (iso9660_xa_t *_xa, uint16_t uid, uint16_t gid, uint16_t attr,
|
|||
|
|
uint8_t filenum)
|
|||
|
|
{
|
|||
|
|
cdio_assert (_xa != NULL);
|
|||
|
|
|
|||
|
|
_xa->user_id = uint16_to_be (uid);
|
|||
|
|
_xa->group_id = uint16_to_be (gid);
|
|||
|
|
_xa->attributes = uint16_to_be (attr);
|
|||
|
|
|
|||
|
|
_xa->signature[0] = 'X';
|
|||
|
|
_xa->signature[1] = 'A';
|
|||
|
|
|
|||
|
|
_xa->filenum = filenum;
|
|||
|
|
|
|||
|
|
_xa->reserved[0]
|
|||
|
|
= _xa->reserved[1]
|
|||
|
|
= _xa->reserved[2]
|
|||
|
|
= _xa->reserved[3]
|
|||
|
|
= _xa->reserved[4] = 0x00;
|
|||
|
|
|
|||
|
|
return _xa;
|
|||
|
|
}
|