Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Allow cross-compiling from Linux
details: https://anonhg.NetBSD.org/src/rev/16d5ba9e9b81
branches: trunk
changeset: 767480:16d5ba9e9b81
user: joerg <joerg%NetBSD.org@localhost>
date: Tue Jul 19 18:29:41 2011 +0000
description:
Allow cross-compiling from Linux
diffstat:
sbin/newfs_v7fs/main.c | 8 ++++++--
usr.sbin/makefs/v7fs.c | 13 ++++++++++---
usr.sbin/makefs/v7fs/Makefile.inc | 4 +++-
3 files changed, 19 insertions(+), 6 deletions(-)
diffs (118 lines):
diff -r 1d1764408c82 -r 16d5ba9e9b81 sbin/newfs_v7fs/main.c
--- a/sbin/newfs_v7fs/main.c Tue Jul 19 16:05:09 2011 +0000
+++ b/sbin/newfs_v7fs/main.c Tue Jul 19 18:29:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.4 2011/07/18 22:50:28 tron Exp $ */
+/* $NetBSD: main.c,v 1.5 2011/07/19 18:29:41 joerg Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.4 2011/07/18 22:50:28 tron Exp $");
+__RCSID("$NetBSD: main.c,v 1.5 2011/07/19 18:29:41 joerg Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -193,7 +193,9 @@
fs->io.write(fs->io.cookie, buf, i);
progress(0);
}
+#ifndef HAVE_NBTOOL_CONFIG_H
progress_done();
+#endif
VPRINTF("\n");
/* Construct superblock */
@@ -233,7 +235,9 @@
blk = sb->freeblock[0];
while ((blk = make_freeblocklist(fs, blk, buf)))
continue;
+#ifndef HAVE_NBTOOL_CONFIG_H
progress_done();
+#endif
VPRINTF("done.\n");
diff -r 1d1764408c82 -r 16d5ba9e9b81 usr.sbin/makefs/v7fs.c
--- a/usr.sbin/makefs/v7fs.c Tue Jul 19 16:05:09 2011 +0000
+++ b/usr.sbin/makefs/v7fs.c Tue Jul 19 18:29:41 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: v7fs.c,v 1.1 2011/07/18 08:58:38 uch Exp $ */
+/* $NetBSD: v7fs.c,v 1.2 2011/07/19 18:29:41 joerg Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: v7fs.c,v 1.1 2011/07/18 08:58:38 uch Exp $");
+__RCSID("$NetBSD: v7fs.c,v 1.2 2011/07/19 18:29:41 joerg Exp $");
#endif /* !__lint */
#include <stdio.h>
@@ -49,10 +49,13 @@
#include "v7fs_impl.h"
#include "v7fs_makefs.h"
#include "newfs_v7fs.h"
-#include "progress.h"
static v7fs_opt_t v7fs_opts;
+
+#ifndef HAVE_NBTOOL_CONFIG_H
+#include "progress.h"
static bool progress_bar_enable;
+#endif
bool verbose;
void
@@ -90,11 +93,13 @@
int fd, endian, error = 1;
verbose = debug;
+#ifndef HAVE_NBTOOL_CONFIG_H
if ((progress_bar_enable = v7fs_opts.progress)) {
progress_switch(progress_bar_enable);
progress_init();
progress(&(struct progress_arg){ .cdev = image });
}
+#endif
/* Determine filesystem image size */
v7fs_estimate(dir, root, fsopts);
@@ -156,6 +161,7 @@
void
progress(const struct progress_arg *p)
{
+#ifndef HAVE_NBTOOL_CONFIG_H
static struct progress_arg Progress;
static char cdev[32];
static char label[32];
@@ -178,4 +184,5 @@
Progress.total++;
progress_bar(cdev, label, Progress.total, PROGRESS_BAR_GRANULE);
}
+#endif
}
diff -r 1d1764408c82 -r 16d5ba9e9b81 usr.sbin/makefs/v7fs/Makefile.inc
--- a/usr.sbin/makefs/v7fs/Makefile.inc Tue Jul 19 16:05:09 2011 +0000
+++ b/usr.sbin/makefs/v7fs/Makefile.inc Tue Jul 19 18:29:41 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.3 2011/07/18 21:22:55 tron Exp $
+# $NetBSD: Makefile.inc,v 1.4 2011/07/19 18:29:41 joerg Exp $
#
V7FS= ${NETBSDSRCDIR}/sys/fs/v7fs
@@ -13,6 +13,8 @@
v7fs_inode_util.c v7fs_datablock.c v7fs_dirent.c v7fs_io.c v7fs_file.c \
v7fs_file_util.c v7fs_io_user.c
SRCS += main.c # newfs
+.if !defined(HOSTPROG)
SRCS += progress.c # progress bar (fsck)
+.endif
SRCS += v7fs_estimate.c v7fs_populate.c
\ No newline at end of file
Home |
Main Index |
Thread Index |
Old Index