.include <bsd.own.mk>
.if defined(__MINIX)
-WARNS=3
+WARNS=2
.endif
PROG= pax
#ifdef HOSTPROG
# include "pack_dev.h" /* explicitly use NetBSD's macros */
+
# define MAJOR(x) major_netbsd(x)
# define MINOR(x) minor_netbsd(x)
# define TODEV(x, y) makedev_netbsd((x), (y))
#define OMAP_UART_FCR_RX_FIFO_TRIG_SHIFT 6
#define OMAP_UART_FCR_RX_FIFO_TRIG_MASK (0x3 << 6)
#define OMAP_UART_FCR_TX_FIFO_TRIG_SHIFT 4
-#define OMAP_UART_FCR_RX_FIFO_TRIG_MASK (0x3 << 4)
+#define OMAP_UART_FCR_TX_FIFO_TRIG_MASK (0x3 << 4)
#define UART_FCR_ENABLE_FIFO 0x01 /* Enable the fifo */
#define UART_FCR_CLR_RCVR 0x02 /* Clear the RCVR FIFO */
#define UART_FCR_CLR_XMIT 0x04 /* Clear the XMIT FIFO */
LIBISPRIVATE= yes
+WARNS=
+
LIB= mdoc
SRCS= mdoc_macro.c mdoc.c mdoc_hash.c mdoc_strings.c \
mdoc_argv.c mdoc_validate.c lib.c att.c \
LIBDPLIBS+= m ${.CURDIR}/../../../../../lib/libm
+.if defined(__MINIX)
+NOGCCERROR=yes
+NOCLANGERROR=yes
+.endif
+
UNSUPPORTED_COMPILER.clang= # defined
CWARNFLAGS.clang+= -Wno-logical-op-parentheses \
-Wno-deprecated-writable-strings -Wno-parentheses
NOPIC= # defined
NOPROFILE= # defined
+.if defined(__MINIX)
+WARNS=
+NOGCCERROR=yes
+NOCLANGERROR=yes
+.else
CWARNFLAGS.clang+= -Wno-parentheses
+.endif
+
UNSUPPORTED_COMPILER.clang= # defined
.include <bsd.own.mk>
LIBISPRIVATE= yes
+.if defined(__MINIX)
+NOGCCERROR=yes
+NOCLANGERROR=yes
+.endif
+
LIB= cpp
SRCS= ${G_libcpp_a_OBJS:.o=.c}
INCSDIR= /usr/include/lzma
-LDFLAGS+= -Wl,-z,defs
+LDFLAGS+= -Wl,-z,defs
+
+.if defined(__MINIX)
+LDFLAGS+= -lc
+.endif
CPPFLAGS+= -I${XZSRCDIR}/src/liblzma/check
CPPFLAGS+= -I${XZSRCDIR}/src/liblzma/common
#define GPIO_MODE_INPUT 0
#define GPIO_MODE_OUTPUT 1
-int gpio_init();
+int gpio_init(void);
/* request access to a gpio */
int gpio_claim(char *owner, int nr, struct gpio **gpio);
/* Interrupt hook */
int gpio_intr_message(message * m);
-int gpio_release();
+int gpio_release(void);
#endif /* __INCLUDE_GPIO_H__ */
#define CONTROL_CONF_PUDEN (1<<3)
#define CONTROL_CONF_MUXMODE(X) (X&0x7)
-int padconf_init();
+int padconf_init(void);
int padconf_set(u32_t padconf, u32_t mask, u32_t value);
-int padconf_release();
+int padconf_release(void);
#endif /* __PADCONF_H__ */
* Implementation-defined extensions
*/
#ifdef __minix
+
int lseek64(int fd, u64_t _offset, int _whence, u64_t *_newpos);
#if defined(_NETBSD_SOURCE)
#include <minix/type.h>
pid_t getnpid(endpoint_t proc_ep);
uid_t getnuid(endpoint_t proc_ep);
gid_t getngid(endpoint_t proc_ep);
-int getnucred(endpoint_t proc_ep, struct ucred *ucred);
ssize_t pread64(int fd, void *buf, size_t count, u64_t where);
ssize_t pwrite64(int fd, const void *buf, size_t count, u64_t where);
#endif /* defined(_NETBSD_SOURCE) */
#include "arch_proto.h"
#include "serial.h"
#include "omap_rtc.h"
+#include "omap_reset.h"
#include "kernel/proc.h"
#include "kernel/debug.h"
#include "direct_utils.h"
#include "kernel/debug.h"
#include "omap_ccnt.h"
#include "omap_padconf.h"
+#include "omap_rtc.h"
+#include "omap_reset.h"
#include "glo.h"
#ifndef __HW_INTR_ARM_H__
#define __HW_INTR_ARM_H__
+#include "omap_intr.h"
+
#include "kernel/kernel.h"
void irq_handle(int irq);
#include "kernel/vm.h"
#include "kernel/proto.h"
#include "arch_proto.h"
+#include "hw_intr.h"
#include "omap_intr.h"
static struct omap_intr {
#endif
omap_intr.size = 0x1000 ; /* 4K */
- kern_phys_map_ptr(omap_intr.base,omap_intr.size,&intr_phys_map,&omap_intr.base);
+ kern_phys_map_ptr(omap_intr.base,omap_intr.size,
+ &intr_phys_map, (vir_bytes) &omap_intr.base);
return 0;
}
{
#if defined(AM335X) || defined(DM37XX)
kern_phys_map_ptr(omap_reset.base, omap_reset.size, &reset_phys_map,
- &omap_reset.base);
+ (vir_bytes) &omap_reset.base);
#endif /* AM335X || DM37XX */
}
omap_serial.size = 0x1000 ; /* 4k */
- kern_phys_map_ptr(omap_serial.base,omap_serial.size,&serial_phys_map,&omap_serial.base);
+ kern_phys_map_ptr(omap_serial.base,omap_serial.size,
+ &serial_phys_map, (vir_bytes) &omap_serial.base);
assert(omap_serial.base);
}
{
u32_t tisr;
- kern_phys_map_ptr(fr_timer.base,ARM_PAGE_SIZE,&fr_timer_phys_map,&fr_timer.base);
+ kern_phys_map_ptr(fr_timer.base,ARM_PAGE_SIZE,
+ &fr_timer_phys_map, (vir_bytes) &fr_timer.base);
+
/* enable the clock */
#ifdef AM335X
/* Disable the module and wait for the module to be disabled */
void omap3_timer_init(unsigned freq)
{
u32_t tisr;
- kern_phys_map_ptr(timer.base,ARM_PAGE_SIZE,&timer_phys_map,&timer.base);
+ kern_phys_map_ptr(timer.base,ARM_PAGE_SIZE,
+ &timer_phys_map, (vir_bytes) &timer.base);
#ifdef AM335X
/* disable the module and wait for the module to be disabled */
set32(CM_WKUP_TIMER1_CLKCTRL, CM_MODULEMODE_MASK,CM_MODULEMODE_DISABLED);
NOT_REACHABLE;
}
+#ifdef __arm__
+#include "omap_serial.h"
+#endif
+
/*===========================================================================*
* kmain *
*===========================================================================*/
/* let the arch code do whatever it needs to setup or quit the watchdog */
int arch_watchdog_init(void);
void arch_watchdog_stop(void);
+
+#ifdef __i386__
/* if the watchdog detects lockup, let the arch code to handle it */
void arch_watchdog_lockup(const struct nmi_frame * frame);
* specific low level handler dumped CPU information and can be inspected by the
* arch specific code of the watchdog implementaion */
void nmi_watchdog_handler(struct nmi_frame * frame);
+#endif
/*
* start and stop profiling using the NMI watchdog
SRCS = pci.c printf.c mem.c pgtab.c dde.c initcall.c thread.c condvar.c lock.c semaphore.c timer.c panic.c irq.c resource.c msg_queue.c
-CFLAGS += -Wall -D_NETBSD_SOURCE
+CFLAGS += -D_NETBSD_SOURCE
.include <bsd.lib.mk>
USE_SHLIBDIR= yes
WIDECHAR ?= yes
+
+.if defined(__MINIX)
+NOGCCERROR=yes
+NOCLANGERROR=yes
+.endif
+
WARNS?= 5
LIB= edit
.include "bsd.own.mk"
COPTS+= -Wunused-parameter
+
+.if !defined(__MINIX)
CWARNFLAGS.gcc+= -Wconversion
+.endif
OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \
hist.c keymacro.c map.c chartype.c \
.irq_id = GPIO6_IRQ_HOOK_ID,
.irq_hook_id = GPIO6_IRQ_HOOK_ID,
},
- {NULL, 0, 0}
+ {NULL, 0, 0, 0, 0, 0, 0, 0 }
};
#define GPIO_REVISION 0x00
#define GPIO_REVISION_MAJOR(X) ((X & 0xF0) >> 4)
#define GPIO_REVISION_MINOR(X) (X & 0XF)
-struct omap_gpio_bank *
+static struct omap_gpio_bank *
omap_gpio_bank_get(int gpio_nr)
{
struct omap_gpio_bank *bank;
return bank;
}
-int
+static int
omap_gpio_claim(char *owner, int nr, struct gpio **gpio)
{
log_trace(&log, "%s s claiming %d\n", owner, nr);
return OK;
}
-int
+static int
omap_gpio_pin_mode(struct gpio *gpio, int mode)
{
struct omap_gpio_bank *bank;
return 0;
}
-int
+static int
omap_gpio_set(struct gpio *gpio, int value)
{
struct omap_gpio_bank *bank;
return OK;
}
-int
+static int
omap_gpio_read(struct gpio *gpio, int *value)
{
struct omap_gpio_bank *bank;
return OK;
}
-int
+static int
omap_gpio_intr_read(struct gpio *gpio, int *value)
{
struct omap_gpio_bank *bank;
return OK;
}
-int
+static int
omap_message_hook(message * m)
{
unsigned long irq_set, i;
return OK;
}
-int
-omap_gpio_init(struct gpio_driver *drv)
+static int
+omap_gpio_init(struct gpio_driver *gpdrv)
{
u32_t revision;
int i;
clkconf_release();
- drv->claim = omap_gpio_claim;
- drv->pin_mode = omap_gpio_pin_mode;
- drv->set = omap_gpio_set;
- drv->read = omap_gpio_read;
- drv->intr_read = omap_gpio_intr_read;
- drv->message_hook = omap_message_hook;
+ gpdrv->claim = omap_gpio_claim;
+ gpdrv->pin_mode = omap_gpio_pin_mode;
+ gpdrv->set = omap_gpio_set;
+ gpdrv->read = omap_gpio_read;
+ gpdrv->intr_read = omap_gpio_intr_read;
+ gpdrv->message_hook = omap_message_hook;
return 0;
}
}
int
-gpio_release()
+gpio_release(void)
{
return OK;
}
#endif /* PBUF_POOL_FREE_OOSEQ */
#if NO_SYS && PBUF_POOL_FREE_OOSEQ
extern volatile u8_t pbuf_free_ooseq_pending;
-void pbuf_free_ooseq();
+void pbuf_free_ooseq(void);
/** When not using sys_check_timeouts(), call PBUF_CHECK_FREE_OOSEQ()
at regular intervals from main level to check if ooseq pbufs need to be
freed! */
scheduler.c \
key.c
-WARNS?= 5
+WARNS?= 4
.include <bsd.lib.mk>
volatile int *sf;
sf = NULL;
- *((int *) sf ) = 1; /* Cause segfault to generate trace */
+ *((volatile int *) sf ) = 1; /* Cause segfault to generate trace */
exit(1);
}
#endif
if (s != ESRCH) /* only error allowed */
printf("WARNING: env_get_param() failed in env_panic(): %d\n", s);
}
- printf("Bad environment setting: '%s = %s'\n", key, value);
- panic("");
+ panic("Bad environment setting: '%s = %s'\n", key, value);
}
if (!rip) {
printf("%s:%d put_inode: inode #%u dev: %d not found\n", __FILE__,
- __LINE__, (ino_t) fs_m_in.REQ_INODE_NR, fs_dev);
+ __LINE__, (unsigned int) fs_m_in.REQ_INODE_NR, fs_dev);
panic("fs_putnode failed");
}
struct inode *new_superdirp, *next_new_superdirp;
int r = OK; /* error flag; initially no error */
int odir, ndir; /* TRUE iff {old|new} file is dir */
- int same_pdir; /* TRUE iff parent dirs are the same */
+ int same_pdir = 0; /* TRUE iff parent dirs are the same */
char old_name[NAME_MAX + 1], new_name[NAME_MAX + 1];
ino_t numb;
phys_bytes len;
/* It was not possible to enter . or .. probably disk was full -
* links counts haven't been touched. */
if (search_dir(ldirp, lastc, NULL, DELETE, IGN_PERM, 0) != OK)
- panic("Dir disappeared: %d ", rip->i_num);
+ panic("Dir disappeared: %d ", (int) rip->i_num);
rip->i_links_count--; /* undo the increment done in new_node() */
}
rip->i_dirt = IN_DIRTY; /* either way, i_links_count has changed */
*/
struct buf *bp;
- int index;
+ int mindex;
block_t b;
unsigned long excess, block_pos;
static char first_time = TRUE;
/* It is not in the inode, so it must be single, double or triple indirect */
if (block_pos < doub_ind_s) {
b = rip->i_block[EXT2_NDIR_BLOCKS]; /* address of single indirect block */
- index = block_pos - EXT2_NDIR_BLOCKS;
+ mindex = block_pos - EXT2_NDIR_BLOCKS;
} else if (block_pos >= out_range_s) { /* TODO: do we need it? */
return(NO_BLOCK);
} else {
ASSERT(lmfs_dev(bp) != NO_DEV);
ASSERT(lmfs_dev(bp) == rip->i_dev);
excess = block_pos - triple_ind_s;
- index = excess / addr_in_block2;
- b = rd_indir(bp, index); /* num of double ind block */
+ mindex = excess / addr_in_block2;
+ b = rd_indir(bp, mindex); /* num of double ind block */
put_block(bp, INDIRECT_BLOCK); /* release triple ind block */
excess = excess % addr_in_block2;
}
}
ASSERT(lmfs_dev(bp) != NO_DEV);
ASSERT(lmfs_dev(bp) == rip->i_dev);
- index = excess / addr_in_block;
- b = rd_indir(bp, index); /* num of single ind block */
+ mindex = excess / addr_in_block;
+ b = rd_indir(bp, mindex); /* num of single ind block */
put_block(bp, INDIRECT_BLOCK); /* release double ind block */
- index = excess % addr_in_block; /* index into single ind blk */
+ mindex = excess % addr_in_block; /* index into single ind blk */
}
if (b == NO_BLOCK) return(NO_BLOCK);
bp = get_block(rip->i_dev, b, iomode); /* get single indirect block */
ASSERT(lmfs_dev(bp) != NO_DEV);
ASSERT(lmfs_dev(bp) == rip->i_dev);
- b = rd_indir(bp, index);
+ b = rd_indir(bp, mindex);
put_block(bp, INDIRECT_BLOCK); /* release single ind block */
return(b);
/*===========================================================================*
* rd_indir *
*===========================================================================*/
-block_t rd_indir(bp, index)
+block_t rd_indir(bp, mindex)
struct buf *bp; /* pointer to indirect block */
-int index; /* index into *bp */
+int mindex; /* index into *bp */
{
if (bp == NULL)
panic("rd_indir() on NULL");
/* TODO: use conv call */
- return conv4(le_CPU, b_ind(bp)[index]);
+ return conv4(le_CPU, b_ind(bp)[mindex]);
}
if (d_desc->d_ino == 0)
continue; /* Entry is not in use */
+#if 0
+ /* read.c:682: error: comparison is always false due to
+ * limited range of data type
+ */
if (d_desc->d_name_len > NAME_MAX ||
d_desc->d_name_len > EXT2_NAME_MAX) {
len = min(NAME_MAX, EXT2_NAME_MAX);
- } else {
+ } else
+#endif
+ {
len = d_desc->d_name_len;
}
+ assert(len <= NAME_MAX);
+ assert(len <= EXT2_NAME_MAX);
+
/* Compute record length */
reclen = offsetof(struct dirent, d_name) + len + 1;
o = (reclen % sizeof(long));
/*===========================================================================*
* write_map *
*===========================================================================*/
-int write_map(rip, position, new_block, op)
+int write_map(rip, position, new_wblock, op)
struct inode *rip; /* pointer to inode to be changed */
off_t position; /* file address to be mapped */
-block_t new_block; /* block # to be inserted */
+block_t new_wblock; /* block # to be inserted */
int op; /* special actions */
{
/* Write a new block into an inode.
*
* If op includes WMAP_FREE, free the block corresponding to that position
- * in the inode ('new_block' is ignored then). Also free the indirect block
+ * in the inode ('new_wblock' is ignored then). Also free the indirect block
* if that was the last entry in the indirect block.
* Also free the double/triple indirect block if that was the last entry in
* the double/triple indirect block.
rip->i_block[block_pos] = NO_BLOCK;
rip->i_blocks -= rip->i_sp->s_sectors_in_block;
} else {
- rip->i_block[block_pos] = new_block;
+ rip->i_block[block_pos] = new_wblock;
rip->i_blocks += rip->i_sp->s_sectors_in_block;
}
return(OK);
}
}
} else {
- wr_indir(bp, index1, new_block);
+ wr_indir(bp, index1, new_wblock);
rip->i_blocks += rip->i_sp->s_sectors_in_block;
}
/* b1 equals NO_BLOCK only when we are freeing up the indirect block. */
/*===========================================================================*
* wr_indir *
*===========================================================================*/
-static void wr_indir(bp, index, block)
+static void wr_indir(bp, wrindex, block)
struct buf *bp; /* pointer to indirect block */
-int index; /* index into *bp */
+int wrindex; /* index into *bp */
block_t block; /* block to write */
{
/* Given a pointer to an indirect block, write one entry. */
panic("wr_indir() on NULL");
/* write a block into an indirect block */
- b_ind(bp)[index] = conv4(le_CPU, block);
+ b_ind(bp)[wrindex] = conv4(le_CPU, block);
}
.PATH: ${.CURDIR}/generic
-WARNS=2
+WARNS=
DPADD+= ${LIBCHARDRIVER} ${LIBSYS} ${LIBMINIXUTIL}
LDADD+= -lchardriver -lsys
BINDIR?= /usr/sbin
-WARNS?=5
+WARNS?=2
CPPFLAGS+= -I${NETBSDSRCDIR}/lib/liblwip/include
CPPFLAGS+= -I${NETBSDSRCDIR}/lib/liblwip/include/ipv4
* at the very begining. dhcp should use raw socket but it is a little
* tricy in the current dhcp implementation
*/
- if (!netif_add(&nic->netif, (ip_addr_t *) &ip_addr_any, &ip_addr_none,
- &ip_addr_none, nic, ethernetif_init, ethernet_input)) {
+ if (!netif_add(&nic->netif, (ip_addr_t *) __UNCONST( &ip_addr_any),
+ &ip_addr_none, &ip_addr_none, nic, ethernetif_init, ethernet_input)) {
printf("LWIP : failed to add device /dev/%s\n", nic->name);
nic->drv_ep = NONE;
}
set_timer(&tcp_stmr, tcp_sticks, tcp_swatchdog, 0);
netif_init();
- netif_lo = netif_find((char *) "lo0");
+ netif_lo = netif_find(__UNCONST("lo0"));
/* Read configuration. */
#if 0
return(OK);
}
-static void sef_local_startup()
+static void sef_local_startup(void)
{
/* Register init callbacks. */
sef_setcb_init_fresh(sef_cb_init_fresh);
slot = (int) (rmp - mproc);
if ((rmp->mp_flags & (IN_USE | EXITING)) != IN_USE) {
- printf("PM: signal %d sent to exiting process %d\n", signo, slot);
- panic("");
+ panic("PM: signal %d sent to exiting process %d\n", signo, slot);
}
#if USE_TRACE
f->filp_mode = FILP_CLOSED;
f->filp_count = 0;
} else if (f->filp_count < 0) {
- panic("VFS: invalid filp count: %d ino %d/%u", f->filp_count,
- vp->v_dev, vp->v_inode_nr);
+ panic("VFS: invalid filp count: %d ino %d/%u",
+ (int) f->filp_count, (int) vp->v_dev, (unsigned int) vp->v_inode_nr);
} else {
unlock_vnode(f->filp_vno);
}
if (!S_ISREG(f->filp_vno->v_mode) && !S_ISBLK(f->filp_vno->v_mode)) {
printf("VFS: mmap regular/blockdev only; dev 0x%x ino %d has mode 0%o\n",
- f->filp_vno->v_dev, f->filp_vno->v_inode_nr, f->filp_vno->v_mode);
+ (int) f->filp_vno->v_dev, (int) f->filp_vno->v_inode_nr, (int) f->filp_vno->v_mode);
unlock_filp(f);
return EINVAL;
}
# LSC MINIX does not support these features ATM.
USE_FORT:= no
+USE_SSP:= no
MKYP:= no
MKPF:= no
MKNLS:= no
CFLAGS+= -mno-sse -mno-sse2 -mno-sse3
COPTS+= -ffreestanding
+.if defined(__MINIX)
+CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes
+.else
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes
+.endif
CPPFLAGS+= -nostdinc -D_STANDALONE
CPPFLAGS+= -I$S
CPUFLAGS= -march=i386 -mtune=i386
.endif
+.if defined(__MINIX)
+CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes
+.else
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes
+.endif
CPPFLAGS+= -nostdinc -D_STANDALONE
CPPFLAGS+= -I$S
#include <dev/videomode/videomode.h>
#ifndef __minix
#include "opt_videomode.h"
+#else
+#include <minix/sysutil.h>
#endif
#ifndef abs
#define abs(x) (((x) < 0) ? -(x) : (x))
gid_t cr_groups[NGROUPS_MAX]; /* groups */
};
+#ifdef __minix
+#include <minix/type.h>
+int getnucred(endpoint_t proc_ep, struct ucred *ucred);
+#endif
+
#endif /* !_SYS_UCRED_H_ */
# $NetBSD: Makefile.inc,v 1.2 2011/09/16 16:30:18 joerg Exp $
WARNS ?= 4
CWARNFLAGS+= -Wno-missing-noreturn
+
+NOGCCERROR=yes
+NOCLANGERROR=yes
LDADD= -lm
# BJG
-WARNS=3
+WARNS=
.include <bsd.prog.mk>
{
FILE *fp;
unsigned int pagesize;
- unsigned long total, free, largest, cached;
+ unsigned long total, freemem, largest, cached;
if ((fp = fopen("meminfo", "r")) == NULL)
return 0;
- if (fscanf(fp, "%u %lu %lu %lu %lu", &pagesize, &total, &free,
+ if (fscanf(fp, "%u %lu %lu %lu %lu", &pagesize, &total, &freemem,
&largest, &cached) != 5) {
fclose(fp);
return 0;
printf("main memory: %ldK total, %ldK free, %ldK contig free, "
"%ldK cached\n",
- (pagesize * total)/1024, (pagesize * free)/1024,
+ (pagesize * total)/1024, (pagesize * freemem)/1024,
(pagesize * largest)/1024, (pagesize * cached)/1024);
return 1;
static int cmp_procs(const void *v1, const void *v2)
{
- struct tp *p1 = (struct tp *) v1, *p2 = (struct tp *) v2;
+ const struct tp *p1 = (const struct tp *) v1,
+ *p2 = (const struct tp *) v2;
int p1blocked, p2blocked;
if(order == ORDER_MEMORY) {
}
static int
-dump_entry(FILE * out, int index, const char *base_dir)
+dump_entry(FILE * out, int mindex, const char *base_dir)
{
int space;
int i;
- struct entry *entry = &entries[index];
+ struct entry *entry = &entries[mindex];
if (entry->type == ENTRY_DIR) {
- for (space = 0; space < entries[index].depth; space++) {
+ for (space = 0; space < entries[mindex].depth; space++) {
fprintf(out, " ");
}
- if (entries[index].depth > 0) {
+ if (entries[mindex].depth > 0) {
fprintf(out, "%s ", entry->filename);
}
fprintf(out, "d%s", parse_mode(entry->mode));
dump_entry(out, i, base_dir);
}
}
- for (space = 0; space < entries[index].depth; space++) {
+ for (space = 0; space < entries[mindex].depth; space++) {
fprintf(out, " ");
}
fprintf(out, "$\n");
} else if (entry->type == ENTRY_FILE) {
- for (space = 0; space < entries[index].depth; space++) {
+ for (space = 0; space < entries[mindex].depth; space++) {
fprintf(out, " ");
}
/* hack skipping the first . in the path */
parse_mode(entry->mode), entry->uid, entry->gid, base_dir,
&entry->path[1]);
} else if (entry->type == ENTRY_LINK) {
- for (space = 0; space < entries[index].depth; space++) {
+ for (space = 0; space < entries[mindex].depth; space++) {
fprintf(out, " ");
}
/* hack skipping the first . in the path */
} else {
/* missing "b" and "c" for block and char device? */
fprintf(out, "# ");
- for (space = 1; space < entries[index].depth; space++) {
+ for (space = 1; space < entries[mindex].depth; space++) {
fprintf(out, " ");
}
fprintf(out, "%i %s\n", entry->type, entry->path);
}
static void
-print_usage()
+print_usage(void)
{
printf("Usage: toproto [OPTION]...\n");
printf