* Stelian Pop <stelian@popies.net>, 1999-2000
* Stelian Pop <stelian@popies.net> - AlcĂ´ve <www.alcove.com>, 2000-2002
*
- * $Id: bsdcompat.h,v 1.20 2003/10/26 16:05:46 stelian Exp $
+ * $Id: bsdcompat.h,v 1.21 2003/11/22 16:52:16 stelian Exp $
*/
#include <config.h>
typedef int16_t __s16;
typedef int32_t __s32;
#ifndef u_int
-#typedef unsigned int u_int;
+typedef unsigned int u_int;
#endif
#ifndef u_int16_t
typedef unsigned short u_int16_t;
#ifndef lint
static const char rcsid[] =
- "$Id: main.c,v 1.87 2003/10/26 16:05:47 stelian Exp $";
+ "$Id: main.c,v 1.88 2003/11/22 16:52:16 stelian Exp $";
#endif /* not lint */
#include <config.h>
static void do_exclude_ino_str __P((char *));
static void incompat_flags __P((int, char, char));
-static char* iexclude_bitmap = NULL; /* the inode exclude bitmap */
-static int iexclude_bitmap_bytes = 0; /* size of bitmap in bytes */
+static char* iexclude_bitmap = NULL; /* the inode exclude bitmap */
+static unsigned int iexclude_bitmap_bytes = 0; /* size of bitmap in bytes */
int
main(int argc, char *argv[])
msg("allocating memory failed\n");
exit(X_STARTUP);
}
- int j;
+ unsigned int j;
for (j = 0; j < iexclude_bitmap_bytes; j++)
iexclude_bitmap[j] = 0;
}
else {
- int oldsize = iexclude_bitmap_bytes;
+ unsigned int oldsize = iexclude_bitmap_bytes;
iexclude_bitmap_bytes *=
(ino / 8 + 1) / iexclude_bitmap_bytes + 1;
iexclude_bitmap = (char*) realloc(iexclude_bitmap,
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.78 2003/10/26 16:05:47 stelian Exp $";
+ "$Id: tape.c,v 1.79 2003/11/22 16:52:16 stelian Exp $";
#endif /* not lint */
#include <config.h>
while ((got = write(fd, buf, need)) > 0 && (need -= got) > 0)
(char *)buf += got;
} while (got == -1 && errno == EINTR);
- return (got < 0 ? got : count - need);
+ return (got < 0 ? got : (ssize_t)count - need);
}
#ifndef lint
static const char rcsid[] =
- "$Id: restore.c,v 1.32 2003/10/26 16:05:48 stelian Exp $";
+ "$Id: restore.c,v 1.33 2003/11/22 16:52:16 stelian Exp $";
#endif /* not lint */
#include <config.h>
(void)extractfinderinfoufs(myname(ep));
#else
msg("MacOSX not supported in this version, skipping\n");
+ skipfile();
#endif
break;
case EXT_MACOSRESFORK:
(void)extractresourceufs(myname(ep));
#else
msg("MacOSX not supported in this version, skipping\n");
+ skipfile();
#endif
break;
case EXT_ACL:
(void)extractfinderinfoufs(myname(ep));
#else
msg("MacOSX not supported in this version, skipping\n");
+ skipfile();
#endif
break;
case EXT_MACOSRESFORK:
(void)extractresourceufs(myname(ep));
#else
msg("MacOSX not supported in this version, skipping\n");
+ skipfile();
#endif
break;
case EXT_ACL:
#ifndef lint
static const char rcsid[] =
- "$Id: tape.c,v 1.75 2003/10/26 16:05:48 stelian Exp $";
+ "$Id: tape.c,v 1.76 2003/11/22 16:52:16 stelian Exp $";
#endif /* not lint */
#include <config.h>
int flags;
mode_t mode;
struct timeval timep[2];
- struct entry *ep;
- int sz;
- attrinfo_block_t gABuf;
u_int32_t uid;
u_int32_t gid;
char path[MAXPATHLEN], fname[MAXPATHLEN];
+ int toto;
curfile.name = name;
curfile.action = USING;
#ifndef lint
static const char rcsid[] =
- "$Id: utilities.c,v 1.23 2003/10/26 16:05:48 stelian Exp $";
+ "$Id: utilities.c,v 1.24 2003/11/22 16:52:16 stelian Exp $";
#endif /* not lint */
#include <config.h>
void
GetPathFile(char *source, char *path, char *fname)
{
- char *p, *s;
+ char *p, *s;
*path = 0;
*fname = 0;
int
GetSCSIIDFromPath(char *devPath, long *id)
{
- int len;
- char fbuff[2048];
- char path[2048];
- char fname[2048];
- char *fpn = fname;
- char idstr[32];
- char *ip = idstr;
+ int len;
+ char fbuff[2048];
+ char path[2048];
+ char fname[2048];
+ char *fpn = fname;
+ char idstr[32];
+ char *ip = idstr;
bzero(fbuff, sizeof(fbuff));
if ((len = readlink(devPath, fbuff, 2048)) == -1) {
CreateAppleDoubleFileRes(char *oFile, FndrFileInfo *finderinfo, mode_t mode, int flags,
struct timeval *timep, u_int32_t uid, u_int32_t gid)
{
- int err = 0;
- int fdout;
- char *p;
- char *f;
- char *pp;
+ int err = 0;
+ int fdout;
+ char *p;
+ char *pp;
ASDHeaderPtr hp;
- ASDEntryPtr ep;
- long thesize;
- long n;
- long loops;
- long remain;
+ ASDEntryPtr ep;
+ long thesize;
+ long n;
n = 1; /* number of entries in double file ._ only finderinfo */
#ifndef lint
static const char rcsid[] =
- "$Id: rmt.c,v 1.27 2003/10/26 16:05:49 stelian Exp $";
+ "$Id: rmt.c,v 1.28 2003/11/22 16:52:16 stelian Exp $";
#endif /* not linux */
/*
getstring(pos);
DEBUG2("rmtd: L %s %s\n", count, pos);
if (!magtape) { /* traditional */
- rval = LSEEK(tape, (OFF_T)atoll(count), atoi(pos));
+ switch (atoi(pos)) {
+ case SEEK_SET:
+ case SEEK_CUR:
+ case SEEK_END:
+ rval = LSEEK(tape, (OFF_T)atoll(count), atoi(pos));
+ break;
+#ifdef USE_QFA
+ case LSEEK_GET_TAPEPOS:
+ rval = LSEEK(tape, (OFF_T)0, SEEK_CUR);
+ break;
+ case LSEEK_GO2_TAPEPOS:
+ rval = LSEEK(tape, (OFF_T)atoll(count), SEEK_SET);
+ break;
+#endif /* USE_QFA */
+ default:
+ errno = EINVAL;
+ goto ioerror;
+ break;
+ }
}
else {
switch (atoi(pos)) {