PERFORCE change 182301 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Thu Aug 12 08:03:49 UTC 2010
http://p4web.freebsd.org/@@182301?ac=10
Change 182301 by trasz at trasz_victim on 2010/08/12 08:02:57
IFC.
Affected files ...
.. //depot/projects/soc2009/trasz_limits/Makefile.mips#2 integrate
.. //depot/projects/soc2009/trasz_limits/bin/sh/expand.c#10 integrate
.. //depot/projects/soc2009/trasz_limits/bin/sh/mksyntax.c#6 integrate
.. //depot/projects/soc2009/trasz_limits/cddl/usr.bin/ctfconvert/Makefile#3 integrate
.. //depot/projects/soc2009/trasz_limits/cddl/usr.bin/ctfconvert/ctfconvert.1#1 branch
.. //depot/projects/soc2009/trasz_limits/cddl/usr.bin/ctfdump/Makefile#3 integrate
.. //depot/projects/soc2009/trasz_limits/cddl/usr.bin/ctfdump/ctfdump.1#1 branch
.. //depot/projects/soc2009/trasz_limits/cddl/usr.bin/ctfmerge/Makefile#3 integrate
.. //depot/projects/soc2009/trasz_limits/cddl/usr.bin/ctfmerge/ctfmerge.1#1 branch
.. //depot/projects/soc2009/trasz_limits/etc/periodic/daily/Makefile#3 integrate
.. //depot/projects/soc2009/trasz_limits/etc/periodic/security/460.chkportsum#2 integrate
.. //depot/projects/soc2009/trasz_limits/games/fortune/datfiles/freebsd-tips#3 integrate
.. //depot/projects/soc2009/trasz_limits/include/unistd.h#7 integrate
.. //depot/projects/soc2009/trasz_limits/lib/libelf/libelf_data.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/lib/libproc/libproc.h#3 integrate
.. //depot/projects/soc2009/trasz_limits/lib/libproc/proc_bkpt.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/lib/libproc/proc_rtld.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/lib/libproc/proc_sym.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/lib/libproc/proc_util.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/mips/reloc.c#4 integrate
.. //depot/projects/soc2009/trasz_limits/release/picobsd/tinyware/login/pico-login.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/Makefile#3 integrate
.. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/auth_subr.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/config.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/fsm.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/iscontrol.8#3 integrate
.. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/iscontrol.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/iscontrol.h#3 integrate
.. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/iscsi.conf.5#4 integrate
.. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/login.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/misc.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/pdu.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/sbin/iscontrol/pdu.h#2 delete
.. //depot/projects/soc2009/trasz_limits/share/man/man4/alc.4#3 integrate
.. //depot/projects/soc2009/trasz_limits/share/man/man4/tpm.4#1 branch
.. //depot/projects/soc2009/trasz_limits/share/man/man9/memguard.9#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/amd64/acpica/acpi_wakeup.c#8 integrate
.. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/mp_machdep.c#11 integrate
.. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/pmap.c#19 integrate
.. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/tsc.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/amd64/amd64/vm_machdep.c#6 integrate
.. //depot/projects/soc2009/trasz_limits/sys/arm/include/pmap.h#5 integrate
.. //depot/projects/soc2009/trasz_limits/sys/boot/zfs/zfsimpl.c#6 integrate
.. //depot/projects/soc2009/trasz_limits/sys/compat/x86bios/x86bios.c#8 integrate
.. //depot/projects/soc2009/trasz_limits/sys/conf/files.i386#18 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/alc/if_alc.c#9 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/alc/if_alcreg.h#3 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/alc/if_alcvar.h#3 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ar5212/ar5212.h#3 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ar5416/ar5416.ini#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c#4 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/ath/if_ath.c#17 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/cfe/cfe_env.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/iscsi/initiator/isc_cam.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/iscsi/initiator/isc_sm.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/iscsi/initiator/isc_soc.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/iscsi/initiator/isc_subr.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/iscsi/initiator/iscsi.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/iscsi/initiator/iscsi.h#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/iscsi/initiator/iscsi_subr.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/iscsi/initiator/iscsivar.h#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/mii/atphy.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/mii/miidevs#9 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/ste/if_ste.c#9 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/tpm/tpm.c#1 branch
.. //depot/projects/soc2009/trasz_limits/sys/dev/tpm/tpm_acpi.c#1 branch
.. //depot/projects/soc2009/trasz_limits/sys/dev/tpm/tpm_isa.c#1 branch
.. //depot/projects/soc2009/trasz_limits/sys/dev/tpm/tpmvar.h#1 branch
.. //depot/projects/soc2009/trasz_limits/sys/dev/usb/serial/uplcom.c#12 integrate
.. //depot/projects/soc2009/trasz_limits/sys/dev/usb/usbdevs#27 integrate
.. //depot/projects/soc2009/trasz_limits/sys/i386/i386/mp_machdep.c#9 integrate
.. //depot/projects/soc2009/trasz_limits/sys/i386/i386/pmap.c#19 integrate
.. //depot/projects/soc2009/trasz_limits/sys/i386/i386/tsc.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/sys/i386/i386/vm_machdep.c#8 integrate
.. //depot/projects/soc2009/trasz_limits/sys/i386/xen/pmap.c#14 integrate
.. //depot/projects/soc2009/trasz_limits/sys/kern/init_main.c#27 integrate
.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_cons.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_jail.c#24 integrate
.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_ktrace.c#5 integrate
.. //depot/projects/soc2009/trasz_limits/sys/kern/kern_malloc.c#5 integrate
.. //depot/projects/soc2009/trasz_limits/sys/kern/subr_smp.c#6 integrate
.. //depot/projects/soc2009/trasz_limits/sys/kern/vfs_bio.c#15 integrate
.. //depot/projects/soc2009/trasz_limits/sys/kern/vfs_cluster.c#5 integrate
.. //depot/projects/soc2009/trasz_limits/sys/mips/include/endian.h#3 integrate
.. //depot/projects/soc2009/trasz_limits/sys/mips/include/pmap.h#9 integrate
.. //depot/projects/soc2009/trasz_limits/sys/mips/mips/pmap.c#17 integrate
.. //depot/projects/soc2009/trasz_limits/sys/mips/rmi/xlr_machdep.c#6 integrate
.. //depot/projects/soc2009/trasz_limits/sys/modules/Makefile#22 integrate
.. //depot/projects/soc2009/trasz_limits/sys/modules/if_carp/Makefile#1 branch
.. //depot/projects/soc2009/trasz_limits/sys/modules/tpm/Makefile#1 branch
.. //depot/projects/soc2009/trasz_limits/sys/net/if.c#19 integrate
.. //depot/projects/soc2009/trasz_limits/sys/net/if_bridge.c#10 integrate
.. //depot/projects/soc2009/trasz_limits/sys/net/if_ethersubr.c#10 integrate
.. //depot/projects/soc2009/trasz_limits/sys/netinet/if_ether.c#14 integrate
.. //depot/projects/soc2009/trasz_limits/sys/netinet/in.c#18 integrate
.. //depot/projects/soc2009/trasz_limits/sys/netinet/in_proto.c#8 integrate
.. //depot/projects/soc2009/trasz_limits/sys/netinet/ip_carp.c#9 integrate
.. //depot/projects/soc2009/trasz_limits/sys/netinet/ip_carp.h#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/netinet/ip_input.c#13 integrate
.. //depot/projects/soc2009/trasz_limits/sys/netinet6/in6_proto.c#10 integrate
.. //depot/projects/soc2009/trasz_limits/sys/netinet6/nd6_nbr.c#7 integrate
.. //depot/projects/soc2009/trasz_limits/sys/opencrypto/cryptodev.c#5 integrate
.. //depot/projects/soc2009/trasz_limits/sys/powerpc/include/pmap.h#8 integrate
.. //depot/projects/soc2009/trasz_limits/sys/sparc64/include/pmap.h#6 integrate
.. //depot/projects/soc2009/trasz_limits/sys/sparc64/include/smp.h#7 integrate
.. //depot/projects/soc2009/trasz_limits/sys/sparc64/sparc64/genassym.c#5 integrate
.. //depot/projects/soc2009/trasz_limits/sys/sparc64/sparc64/mp_exception.S#2 integrate
.. //depot/projects/soc2009/trasz_limits/sys/sparc64/sparc64/mp_machdep.c#8 integrate
.. //depot/projects/soc2009/trasz_limits/sys/sparc64/sparc64/tick.c#5 integrate
.. //depot/projects/soc2009/trasz_limits/sys/sun4v/include/smp.h#5 integrate
.. //depot/projects/soc2009/trasz_limits/sys/sun4v/sun4v/mp_machdep.c#5 integrate
.. //depot/projects/soc2009/trasz_limits/sys/sun4v/sun4v/pmap.c#7 integrate
.. //depot/projects/soc2009/trasz_limits/sys/teken/teken_subr.h#6 integrate
.. //depot/projects/soc2009/trasz_limits/sys/vm/memguard.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/sys/vm/memguard.h#3 integrate
.. //depot/projects/soc2009/trasz_limits/sys/vm/vm_extern.h#7 integrate
.. //depot/projects/soc2009/trasz_limits/sys/vm/vm_kern.c#4 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/bin/sh/expansion/pathname3.0#1 branch
.. //depot/projects/soc2009/trasz_limits/tools/regression/bin/sh/expansion/plus-minus4.0#1 branch
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/fstest.c#5 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/chflags/00.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/chflags/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/chflags/03.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/chflags/10.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/chflags/11.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/chmod/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/chmod/03.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/chown/00.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/chown/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/chown/03.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/conf#3 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/link/00.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/link/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/link/03.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/misc.sh#3 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/mkdir/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/mkdir/03.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/mkdir/10.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/mkfifo/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/mkfifo/03.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/mknod/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/mknod/03.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/open/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/open/03.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/open/22.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/00.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/01.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/06.t#3 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/07.t#3 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/08.t#3 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/09.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/10.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/13.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/14.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/15.t#3 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/20.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rename/21.t#3 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rmdir/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/rmdir/03.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/symlink/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/symlink/03.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/truncate/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/truncate/03.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/unlink/00.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/unlink/02.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/unlink/03.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/regression/fstest/tests/unlink/11.t#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/tools/vhba/Makefile#2 integrate
.. //depot/projects/soc2009/trasz_limits/tools/tools/vhba/mptest/Makefile#1 branch
.. //depot/projects/soc2009/trasz_limits/tools/tools/vhba/mptest/vhba_mptest.c#1 branch
.. //depot/projects/soc2009/trasz_limits/tools/tools/vhba/vhba.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/usr.bin/Makefile#11 integrate
.. //depot/projects/soc2009/trasz_limits/usr.bin/elfdump/elfdump.c#2 integrate
.. //depot/projects/soc2009/trasz_limits/usr.bin/indent/indent.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/usr.sbin/acpi/acpidump/acpi.c#5 integrate
.. //depot/projects/soc2009/trasz_limits/usr.sbin/acpi/acpidump/acpidump.h#4 integrate
.. //depot/projects/soc2009/trasz_limits/usr.sbin/crunch/crunchide/exec_elf32.c#3 integrate
.. //depot/projects/soc2009/trasz_limits/usr.sbin/jail/jail.8#14 integrate
.. //depot/projects/soc2009/trasz_limits/usr.sbin/kbdcontrol/kbdcontrol.1#2 integrate
.. //depot/projects/soc2009/trasz_limits/usr.sbin/lpr/lpd/printjob.c#2 integrate
Differences ...
==== //depot/projects/soc2009/trasz_limits/Makefile.mips#2 (text+ko) ====
@@ -1,5 +1,2 @@
-# $FreeBSD: src/Makefile.mips,v 1.1 2010/06/24 16:28:52 imp Exp $
+# $FreeBSD: src/Makefile.mips,v 1.2 2010/08/10 14:36:20 adrian Exp $
-# A bug in binutils prevents rescue from building, so override the user's
-# choice.
-MK_RESCUE=no
==== //depot/projects/soc2009/trasz_limits/bin/sh/expand.c#10 (text+ko) ====
@@ -38,7 +38,7 @@
#endif
#endif /* not lint */
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/sh/expand.c,v 1.65 2010/06/29 22:37:45 jilles Exp $");
+__FBSDID("$FreeBSD: src/bin/sh/expand.c,v 1.66 2010/08/10 22:45:59 jilles Exp $");
#include <sys/types.h>
#include <sys/time.h>
@@ -1082,9 +1082,9 @@
* should be escapes. The results are stored in the list exparg.
*/
-STATIC char *expdir;
+STATIC char expdir[PATH_MAX];
+#define expdir_end (expdir + sizeof(expdir))
-
STATIC void
expandmeta(struct strlist *str, int flag __unused)
{
@@ -1106,14 +1106,7 @@
}
savelastp = exparg.lastp;
INTOFF;
- if (expdir == NULL) {
- int i = strlen(str->text);
- expdir = ckmalloc(i < 2048 ? 2048 : i); /* XXX */
- }
-
expmeta(expdir, str->text);
- ckfree(expdir);
- expdir = NULL;
INTON;
if (exparg.lastp == savelastp) {
/*
@@ -1202,6 +1195,8 @@
*enddir++ = *p;
if (*p == '\0')
break;
+ if (enddir == expdir_end)
+ return;
}
if (metaflag == 0 || lstat(expdir, &statb) >= 0)
addfname(expdir);
@@ -1216,6 +1211,8 @@
if (*p == CTLESC)
p++;
*enddir++ = *p++;
+ if (enddir == expdir_end)
+ return;
}
}
if (enddir == expdir) {
@@ -1249,15 +1246,17 @@
if (dp->d_name[0] == '.' && ! matchdot)
continue;
if (patmatch(start, dp->d_name, 0)) {
- if (atend) {
- scopy(dp->d_name, enddir);
+ if (enddir + dp->d_namlen + 1 > expdir_end)
+ continue;
+ memcpy(enddir, dp->d_name, dp->d_namlen + 1);
+ if (atend)
addfname(expdir);
- } else {
- for (p = enddir, q = dp->d_name;
- (*p++ = *q++) != '\0';)
+ else {
+ if (enddir + dp->d_namlen + 2 > expdir_end)
continue;
- p[-1] = '/';
- expmeta(p, endname);
+ enddir[dp->d_namlen] = '/';
+ enddir[dp->d_namlen + 1] = '\0';
+ expmeta(enddir + dp->d_namlen + 1, endname);
}
}
}
==== //depot/projects/soc2009/trasz_limits/bin/sh/mksyntax.c#6 (text+ko) ====
@@ -42,7 +42,7 @@
#endif /* not lint */
#endif
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/bin/sh/mksyntax.c,v 1.29 2010/04/11 12:24:47 jilles Exp $");
+__FBSDID("$FreeBSD: src/bin/sh/mksyntax.c,v 1.30 2010/08/08 21:04:27 jilles Exp $");
/*
* This program creates syntax.h and syntax.c.
@@ -241,8 +241,8 @@
filltable("0");
fputs("\n/* character classification table */\n", cfile);
add("0123456789", "ISDIGIT");
- add("abcdefghijklmnopqrstucvwxyz", "ISLOWER");
- add("ABCDEFGHIJKLMNOPQRSTUCVWXYZ", "ISUPPER");
+ add("abcdefghijklmnopqrstuvwxyz", "ISLOWER");
+ add("ABCDEFGHIJKLMNOPQRSTUVWXYZ", "ISUPPER");
add("_", "ISUNDER");
add("#?$!-*@", "ISSPECL");
print("is_type");
==== //depot/projects/soc2009/trasz_limits/cddl/usr.bin/ctfconvert/Makefile#3 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/cddl/usr.bin/ctfconvert/Makefile,v 1.3 2010/03/02 19:04:07 uqs Exp $
+# $FreeBSD: src/cddl/usr.bin/ctfconvert/Makefile,v 1.4 2010/08/11 18:00:45 rpaulo Exp $
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt
@@ -6,7 +6,6 @@
DEBUG_FLAGS= -g
PROG= ctfconvert
-NO_MAN=
SRCS= alist.c \
ctf.c \
ctfconvert.c \
==== //depot/projects/soc2009/trasz_limits/cddl/usr.bin/ctfdump/Makefile#3 (text+ko) ====
@@ -1,10 +1,9 @@
-# $FreeBSD: src/cddl/usr.bin/ctfdump/Makefile,v 1.3 2010/03/02 19:04:07 uqs Exp $
+# $FreeBSD: src/cddl/usr.bin/ctfdump/Makefile,v 1.4 2010/08/11 18:00:45 rpaulo Exp $
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/dump
PROG= ctfdump
-NO_MAN=
SRCS= dump.c \
symbol.c \
utils.c
==== //depot/projects/soc2009/trasz_limits/cddl/usr.bin/ctfmerge/Makefile#3 (text+ko) ====
@@ -1,10 +1,9 @@
-# $FreeBSD: src/cddl/usr.bin/ctfmerge/Makefile,v 1.3 2010/03/02 19:04:07 uqs Exp $
+# $FreeBSD: src/cddl/usr.bin/ctfmerge/Makefile,v 1.4 2010/08/11 18:00:45 rpaulo Exp $
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/common
.PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/tools/ctf/cvt
PROG= ctfmerge
-NO_MAN=
SRCS= alist.c \
barrier.c \
ctf.c \
==== //depot/projects/soc2009/trasz_limits/etc/periodic/daily/Makefile#3 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/etc/periodic/daily/Makefile,v 1.18 2010/06/17 12:25:47 netchild Exp $
+# $FreeBSD: src/etc/periodic/daily/Makefile,v 1.19 2010/08/10 12:58:44 olli Exp $
.include <bsd.own.mk>
@@ -39,6 +39,10 @@
FILES+= 480.status-ntpd
.endif
+.if ${MK_PKGTOOLS} != "no"
+FILES+= 490.status-pkg-changes
+.endif
+
.if ${MK_RCMDS} != "no"
FILES+= 140.clean-rwho \
430.status-rwho
==== //depot/projects/soc2009/trasz_limits/etc/periodic/security/460.chkportsum#2 (text+ko) ====
@@ -24,7 +24,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
-# $FreeBSD: src/etc/periodic/security/460.chkportsum,v 1.1 2010/07/19 20:19:14 gabor Exp $
+# $FreeBSD: src/etc/periodic/security/460.chkportsum,v 1.2 2010/08/10 11:15:17 gabor Exp $
#
if [ -r /etc/defaults/periodic.conf ]
@@ -42,20 +42,20 @@
case "${daily_status_security_chkportsum_enable}" in
[Yy][Ee][Ss])
+ set -f
pkg_info -ga 2>/dev/null | \
- while read one two three; do
- case ${one} in
+ while IFS= read -r line; do
+ set -- $line
+ case $1 in
Information)
- case ${two} in
- for) name=${three%%:} ;;
- *) name='??' ;;
+ case $2 in
+ for) name="${3%%:}" ;;
+ *) name='??' ;;
esac
;;
Mismatched|'') ;;
- *)
- if [ -n ${name} ]; then
- echo ${name}: ${one}
- fi
+ *) [ -n "${name}" ] &&
+ echo "${name}: ${line%% fails the original MD5 checksum}"
;;
esac
done
==== //depot/projects/soc2009/trasz_limits/games/fortune/datfiles/freebsd-tips#3 (text+ko) ====
@@ -1,5 +1,5 @@
This fortune brought to you by:
-$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.48 2010/01/11 21:17:49 gavin Exp $
+$FreeBSD: src/games/fortune/datfiles/freebsd-tips,v 1.49 2010/08/09 09:26:17 fjoe Exp $
%
Any user that is a member of the wheel group can use "su -" to simulate
a root login. You can add a user to the wheel group by editing /etc/group.
@@ -476,6 +476,6 @@
directories for the specified programs. This can be particularly handy
when you are trying to find where in the ports tree an application is.
-Try "whereis netscape" and "whereis whereis".
+Try "whereis firefox" and "whereis whereis".
-- Konstantinos Konstantinidis <kkonstan at duth.gr>
%
==== //depot/projects/soc2009/trasz_limits/include/unistd.h#7 (text+ko) ====
@@ -27,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)unistd.h 8.12 (Berkeley) 4/27/95
- * $FreeBSD: src/include/unistd.h,v 1.97 2010/02/16 19:39:50 imp Exp $
+ * $FreeBSD: src/include/unistd.h,v 1.98 2010/08/11 09:29:33 kevlo Exp $
*/
#ifndef _UNISTD_H_
@@ -74,7 +74,7 @@
#define _USECONDS_T_DECLARED
#endif
-#define STDIN_FILENO 0 /* standard input file descriptor */
+#define STDIN_FILENO 0 /* standard input file descriptor */
#define STDOUT_FILENO 1 /* standard output file descriptor */
#define STDERR_FILENO 2 /* standard error file descriptor */
==== //depot/projects/soc2009/trasz_limits/lib/libelf/libelf_data.c#3 (text+ko) ====
@@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libelf/libelf_data.c,v 1.5 2010/07/21 10:39:29 kaiw Exp $");
+__FBSDID("$FreeBSD: src/lib/libelf/libelf_data.c,v 1.6 2010/08/11 19:59:31 kaiw Exp $");
#include <libelf.h>
#include <osreldate.h>
@@ -81,6 +81,8 @@
return (ELF_T_MOVE);
case SHT_SUNW_syminfo:
return (ELF_T_SYMINFO);
+ case SHT_SUNW_dof:
+ return (ELF_T_BYTE);
#endif
case SHT_AMD64_UNWIND: /* == SHT_IA_64_UNWIND */
return (ELF_T_BYTE);
==== //depot/projects/soc2009/trasz_limits/lib/libproc/libproc.h#3 (text+ko) ====
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libproc/libproc.h,v 1.3 2010/07/31 16:10:20 rpaulo Exp $
+ * $FreeBSD: src/lib/libproc/libproc.h,v 1.4 2010/08/11 17:33:26 rpaulo Exp $
*/
#ifndef _LIBPROC_H_
@@ -131,7 +131,7 @@
int proc_wstatus(struct proc_handle *);
int proc_getwstat(struct proc_handle *);
char * proc_signame(int, char *, size_t);
-int proc_read(struct proc_handle *, char *, size_t, size_t);
+int proc_read(struct proc_handle *, void *, size_t, size_t);
const lwpstatus_t *
proc_getlwpstatus(struct proc_handle *);
void proc_free(struct proc_handle *);
==== //depot/projects/soc2009/trasz_limits/lib/libproc/proc_bkpt.c#2 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libproc/proc_bkpt.c,v 1.1 2010/07/31 16:10:20 rpaulo Exp $");
+__FBSDID("$FreeBSD: src/lib/libproc/proc_bkpt.c,v 1.2 2010/08/11 17:33:26 rpaulo Exp $");
#include <sys/types.h>
#include <sys/ptrace.h>
@@ -164,7 +164,8 @@
warn("ERROR: ptrace step failed");
return (-1);
}
- status = proc_wstatus(phdl);
+ proc_wstatus(phdl);
+ status = proc_getwstat(phdl);
if (!WIFSTOPPED(status)) {
warn("ERROR: don't know why process stopped");
return (-1);
==== //depot/projects/soc2009/trasz_limits/lib/libproc/proc_rtld.c#2 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/lib/libproc/proc_rtld.c,v 1.1 2010/07/31 16:10:20 rpaulo Exp $");
+__FBSDID("$FreeBSD: src/lib/libproc/proc_rtld.c,v 1.2 2010/08/11 17:33:26 rpaulo Exp $");
#include <stdio.h>
#include <string.h>
@@ -42,14 +42,13 @@
{
struct proc_handle *phdl = arg;
- phdl->nobjs++;
if (phdl->nobjs >= phdl->rdobjsz) {
phdl->rdobjsz *= 2;
phdl->rdobjs = realloc(phdl->rdobjs, phdl->rdobjsz);
if (phdl->rdobjs == NULL)
return (-1);
}
- memcpy(&phdl->rdobjs[phdl->nobjs++], lop, sizeof(*phdl->rdobjs));
+ memcpy(&phdl->rdobjs[phdl->nobjs++], lop, sizeof(*lop));
return (0);
}
@@ -61,6 +60,7 @@
phdl->status != PS_IDLE) {
if ((phdl->rdap = rd_new(phdl)) != NULL) {
phdl->rdobjs = malloc(sizeof(*phdl->rdobjs) * 64);
+ phdl->rdobjsz = 64;
if (phdl->rdobjs == NULL)
return (phdl->rdap);
rd_loadobj_iter(phdl->rdap, map_iter, phdl);
@@ -73,7 +73,8 @@
void
proc_updatesyms(struct proc_handle *phdl)
{
- memset(&phdl->rdobjs, 0, sizeof(*phdl->rdobjs) * phdl->rdobjsz);
+
+ memset(phdl->rdobjs, 0, sizeof(*phdl->rdobjs) * phdl->rdobjsz);
phdl->nobjs = 0;
rd_loadobj_iter(phdl->rdap, map_iter, phdl);
}
==== //depot/projects/soc2009/trasz_limits/lib/libproc/proc_sym.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libproc/proc_sym.c,v 1.2 2010/07/31 16:10:20 rpaulo Exp $
+ * $FreeBSD: src/lib/libproc/proc_sym.c,v 1.3 2010/08/11 17:33:26 rpaulo Exp $
*/
#include <sys/types.h>
@@ -110,14 +110,25 @@
rd_loadobj_t *rdl;
prmap_t map;
char path[MAXPATHLEN];
+ char last[MAXPATHLEN];
if (p->nobjs == 0)
return (-1);
+ memset(last, 0, sizeof(last));
for (i = 0; i < p->nobjs; i++) {
rdl = &p->rdobjs[i];
proc_rdl2prmap(rdl, &map);
basename_r(rdl->rdl_path, path);
+ /*
+ * We shouldn't call the callback twice with the same object.
+ * To do that we are assuming the fact that if there are
+ * repeated object names (i.e. different mappings for the
+ * same object) they occur next to each other.
+ */
+ if (strcmp(path, last) == 0)
+ continue;
(*func)(cd, &map, path);
+ strlcpy(last, path, sizeof(last));
}
return (0);
==== //depot/projects/soc2009/trasz_limits/lib/libproc/proc_util.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/lib/libproc/proc_util.c,v 1.2 2010/07/31 16:10:20 rpaulo Exp $
+ * $FreeBSD: src/lib/libproc/proc_util.c,v 1.3 2010/08/11 17:33:26 rpaulo Exp $
*/
#include <sys/types.h>
@@ -144,15 +144,17 @@
if (phdl == NULL)
return (-1);
- if (waitpid(phdl->pid, &status, WUNTRACED) < 0)
+ if (waitpid(phdl->pid, &status, WUNTRACED) < 0) {
+ warn("waitpid");
return (-1);
+ }
if (WIFSTOPPED(status))
phdl->status = PS_STOP;
if (WIFEXITED(status) || WIFSIGNALED(status))
phdl->status = PS_UNDEAD;
phdl->wstat = status;
- return (status);
+ return (phdl->status);
}
int
@@ -175,7 +177,7 @@
}
int
-proc_read(struct proc_handle *phdl, char *buf, size_t size, size_t addr)
+proc_read(struct proc_handle *phdl, void *buf, size_t size, size_t addr)
{
struct ptrace_io_desc piod;
@@ -200,7 +202,8 @@
if (phdl == NULL)
return (NULL);
- if (ptrace(PT_LWPINFO, phdl->pid, (caddr_t)&lwpinfo,sizeof(lwpinfo)) < 0)
+ if (ptrace(PT_LWPINFO, phdl->pid, (caddr_t)&lwpinfo,
+ sizeof(lwpinfo)) < 0)
return (NULL);
siginfo = &lwpinfo.pl_siginfo;
if (lwpinfo.pl_event == PL_EVENT_SIGNAL &&
==== //depot/projects/soc2009/trasz_limits/libexec/rtld-elf/mips/reloc.c#4 (text+ko) ====
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/libexec/rtld-elf/mips/reloc.c,v 1.5 2010/07/29 20:18:52 jchandra Exp $");
+__FBSDID("$FreeBSD: src/libexec/rtld-elf/mips/reloc.c,v 1.7 2010/08/11 02:28:39 neel Exp $");
#include <sys/types.h>
#include <sys/stat.h>
@@ -75,7 +75,7 @@
* ELF64 MIPS encodes the relocs uniquely. The first 32-bits of info contain
* the symbol index. The top 32-bits contain three relocation types encoded
* in big-endian integer with first relocation in LSB. This means for little
- * endian we have to byte swap that interger (r_type).
+ * endian we have to byte swap that integer (r_type).
*/
#define Elf_Sxword Elf64_Sxword
#define ELF_R_NXTTYPE_64_P(r_type) ((((r_type) >> 8) & 0xff) == R_TYPE(64))
==== //depot/projects/soc2009/trasz_limits/release/picobsd/tinyware/login/pico-login.c#3 (text+ko) ====
@@ -42,7 +42,7 @@
static char sccsid[] = "@(#)login.c 8.4 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
- "$FreeBSD: src/release/picobsd/tinyware/login/pico-login.c,v 1.7 2010/02/14 15:51:36 luigi Exp $";
+ "$FreeBSD: src/release/picobsd/tinyware/login/pico-login.c,v 1.9 2010/08/08 16:55:27 gavin Exp $";
#endif /* not lint */
/*
@@ -279,7 +279,8 @@
* Get "login-retries" & "login-backoff" from default class
*/
lc = login_getclass(NULL);
- prompt = login_getcapstr(lc, "prompt", DEFAULT_PROMPT, DEFAULT_PROMPT);
+ prompt = login_getcapstr(lc, "login_prompt",
+ DEFAULT_PROMPT, DEFAULT_PROMPT);
passwd_prompt = login_getcapstr(lc, "passwd_prompt",
DEFAULT_PASSWD_PROMPT, DEFAULT_PASSWD_PROMPT);
retries = login_getcapnum(lc, "login-retries", DEFAULT_RETRIES,
@@ -538,10 +539,10 @@
* devices, we just clear them.
*/
if (chflags(ttyn, 0) && errno != EOPNOTSUPP)
- syslog(LOG_ERR, "chmod(%s): %m", ttyn);
+ syslog(LOG_ERR, "chflags(%s): %m", ttyn);
if (chown(ttyn, pwd->pw_uid,
(gr = getgrnam(TTYGRPNAME)) ? gr->gr_gid : pwd->pw_gid))
- syslog(LOG_ERR, "chmod(%s): %m", ttyn);
+ syslog(LOG_ERR, "chown(%s): %m", ttyn);
/*
==== //depot/projects/soc2009/trasz_limits/sbin/iscontrol/Makefile#3 (text+ko) ====
@@ -1,12 +1,13 @@
-# $FreeBSD: src/sbin/iscontrol/Makefile,v 1.2 2009/10/19 16:00:24 ru Exp $
+# $FreeBSD: src/sbin/iscontrol/Makefile,v 1.3 2010/08/09 12:36:36 des Exp $
SRCS= iscontrol.c pdu.c fsm.c config.c login.c auth_subr.c misc.c
PROG= iscontrol
DPADD= ${LIBCAM} ${LIBMD}
LDADD= -lcam -lmd
+S= ${.CURDIR}/../../sys
-WARNS?= 2
-CFLAGS += -I${.CURDIR}/../../sys/dev/iscsi/initiator
+WARNS?= 3
+CFLAGS += -I$S
#CFLAGS += -g -DDEBUG
MAN= iscsi.conf.5 iscontrol.8
==== //depot/projects/soc2009/trasz_limits/sbin/iscontrol/auth_subr.c#2 (text+ko) ====
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2005-2008 Daniel Braniss <danny at cs.huji.ac.il>
+ * Copyright (c) 2005-2010 Daniel Braniss <danny at cs.huji.ac.il>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/iscontrol/auth_subr.c,v 1.2 2008/11/25 07:17:11 scottl Exp $");
+__FBSDID("$FreeBSD: src/sbin/iscontrol/auth_subr.c,v 1.3 2010/08/09 12:36:36 des Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -52,7 +52,7 @@
#include <md5.h>
#include <sha.h>
-#include "iscsi.h"
+#include <dev/iscsi/initiator/iscsi.h>
#include "iscontrol.h"
static int
@@ -152,7 +152,7 @@
}
char *
-genChapChallenge(char *encoding, int len)
+genChapChallenge(char *encoding, uint len)
{
int fd;
unsigned char tmp[1024];
==== //depot/projects/soc2009/trasz_limits/sbin/iscontrol/config.c#3 (text+ko) ====
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2005-2008 Daniel Braniss <danny at cs.huji.ac.il>
+ * Copyright (c) 2005-2009 Daniel Braniss <danny at cs.huji.ac.il>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/iscontrol/config.c,v 1.3 2010/06/11 17:03:04 uqs Exp $");
+__FBSDID("$FreeBSD: src/sbin/iscontrol/config.c,v 1.4 2010/08/09 12:36:36 des Exp $");
#include <stdlib.h>
#include <unistd.h>
@@ -41,7 +41,7 @@
#include <ctype.h>
#include <camlib.h>
-#include "iscsi.h"
+#include <dev/iscsi/initiator/iscsi.h>
#include "iscontrol.h"
/*
@@ -94,6 +94,11 @@
#define OPT_iqn 34
#define OPT_sockbufsize 35
+/*
+ | sentinel
+ */
+#define OPT_end 0
+
#define _OFF(v) ((int)&((isc_opt_t *)NULL)->v)
#define _E(u, s, v) {.usage=u, .scope=s, .name=#v, .tokenID=OPT_##v}
@@ -145,7 +150,7 @@
_E(U_LO, S_SW, sessionType),
- {0}
+ _E(0, 0, end)
};
#define _OPT_INT(w) strtol((char *)w, NULL, 0)
@@ -154,7 +159,7 @@
static __inline int
_OPT_BOOL(char *w)
{
- if(isalpha(*w))
+ if(isalpha((unsigned char)*w))
return strcasecmp(w, "TRUE") == 0;
else
return _OPT_INT(w);
@@ -244,12 +249,12 @@
len = 0;
state = 0;
while((lp = getline(fd)) != NULL) {
- for(; isspace(*lp); lp++)
+ for(; isspace((unsigned char)*lp); lp++)
;
switch(state) {
case 0:
if((p = strchr(lp, '{')) != NULL) {
- while((--p > lp) && *p && isspace(*p));
+ while((--p > lp) && *p && isspace((unsigned char)*p));
n = p - lp;
if(len && strncmp(lp, key, MAX(n, len)) == 0)
state = 2;
@@ -272,7 +277,7 @@
}
- for(p = &lp[strlen(lp)-1]; isspace(*p); p--)
+ for(p = &lp[strlen(lp)-1]; isspace((unsigned char)*p); p--)
*p = 0;
if((*nargs)-- > 0)
*ar++ = strdup(lp);
@@ -351,9 +356,9 @@
continue;
*p = 0;
v = p + 1;
- while(isspace(*--p))
+ while(isspace((unsigned char)*--p))
*p = 0;
- while(isspace(*v))
+ while(isspace((unsigned char)*v))
v++;
if((tk = keyLookup(*ar)) == NULL)
continue;
==== //depot/projects/soc2009/trasz_limits/sbin/iscontrol/fsm.c#2 (text+ko) ====
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2005-2008 Daniel Braniss <danny at cs.huji.ac.il>
+ * Copyright (c) 2005-2010 Daniel Braniss <danny at cs.huji.ac.il>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/iscontrol/fsm.c,v 1.2 2008/11/25 07:17:11 scottl Exp $");
+__FBSDID("$FreeBSD: src/sbin/iscontrol/fsm.c,v 1.3 2010/08/09 12:36:36 des Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -56,7 +56,7 @@
#include <stdarg.h>
#include <camlib.h>
-#include "iscsi.h"
+#include <dev/iscsi/initiator/iscsi.h>
#include "iscontrol.h"
typedef enum {
@@ -99,26 +99,26 @@
#ifdef notyet
{
time_t sec;
- // make sure we are not in a loop
- // XXX: this code has to be tested
- sec = time(0) - sess->reconnect_time;
- if(sec > (5*60)) {
- // if we've been connected for more that 5 minutes
- // then just reconnect
- sess->reconnect_time = sec;
- sess->reconnect_cnt1 = 0;
- }
- else {
- //
- sess->reconnect_cnt1++;
- if((sec / sess->reconnect_cnt1) < 2) {
- // if less that 2 seconds from the last reconnect
- // we are most probably looping
- syslog(LOG_CRIT, "too many reconnects %d", sess->reconnect_cnt1);
- return 0;
+ // make sure we are not in a loop
+ // XXX: this code has to be tested
+ sec = time(0) - sess->reconnect_time;
+ if(sec > (5*60)) {
+ // if we've been connected for more that 5 minutes
+ // then just reconnect
+ sess->reconnect_time = sec;
+ sess->reconnect_cnt1 = 0;
+ }
+ else {
+ //
+ sess->reconnect_cnt1++;
+ if((sec / sess->reconnect_cnt1) < 2) {
+ // if less that 2 seconds from the last reconnect
+ // we are most probably looping
+ syslog(LOG_CRIT, "too many reconnects %d", sess->reconnect_cnt1);
+ return 0;
+ }
}
}
- }
#endif
sess->reconnect_cnt++;
}
@@ -140,13 +140,13 @@
if (soc == -1)
continue;
- // from Patrick.Guelat at imp.ch:
- // iscontrol can be called without waiting for the socket entry to time out
- val = 1;
+ // from Patrick.Guelat at imp.ch:
+ // iscontrol can be called without waiting for the socket entry to time out
+ val = 1;
if(setsockopt(soc, SOL_SOCKET, SO_REUSEADDR, &val, (socklen_t)sizeof(val)) < 0) {
- fprintf(stderr, "Cannot set socket SO_REUSEADDR %d: %s\n\n",
- errno, strerror(errno));
- }
+ fprintf(stderr, "Cannot set socket SO_REUSEADDR %d: %s\n\n",
+ errno, strerror(errno));
+ }
if(connect(soc, res->ai_addr, res->ai_addrlen) == 0)
break;
@@ -196,7 +196,7 @@
}
sess->flags |= SESS_CONNECTED;
return T1;
- }
+ }
fprintf(stderr, "errno=%d\n", sv_errno);
perror("connect");
@@ -289,7 +289,7 @@
// XXX: this has to go
size_t n;
n = sizeof(sess->isid);
- if(sysctlbyname("net.iscsi.isid", (void *)sess->isid, (size_t *)&n, 0, 0) != 0)
+ if(sysctlbyname("net.iscsi_initiator.isid", (void *)sess->isid, (size_t *)&n, 0, 0) != 0)
perror("sysctlbyname");
}
if(ioctl(fd, ISCSISETSES, &n)) {
@@ -343,29 +343,29 @@
}
}
-static void
+static int
doCAM(isess_t *sess)
{
char pathstr[1024];
union ccb *ccb;
- int i;
+ int i, n;
if(ioctl(sess->fd, ISCSIGETCAM, &sess->cam) != 0) {
syslog(LOG_WARNING, "ISCSIGETCAM failed: %d", errno);
- return;
+ return 0;
}
- debug(2, "nluns=%d", sess->cam.target_nluns);
+ debug(1, "nluns=%d", sess->cam.target_nluns);
/*
| for now will do this for each lun ...
*/
- for(i = 0; i < sess->cam.target_nluns; i++) {
+ for(n = i = 0; i < sess->cam.target_nluns; i++) {
debug(2, "CAM path_id=%d target_id=%d target_lun=%d",
sess->cam.path_id, sess->cam.target_id, sess->cam.target_lun[i]);
sess->camdev = cam_open_btl(sess->cam.path_id, sess->cam.target_id,
- sess->cam.target_lun[i], O_RDWR, NULL);
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list