From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 00:19:51 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C9BB1065679; Thu, 1 Jan 2009 00:19:51 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A3C68FC14; Thu, 1 Jan 2009 00:19:51 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n010Jpib039018; Thu, 1 Jan 2009 00:19:51 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n010JpBu039017; Thu, 1 Jan 2009 00:19:51 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901010019.n010JpBu039017@svn.freebsd.org> From: Ed Schouten Date: Thu, 1 Jan 2009 00:19:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186664 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 00:19:52 -0000 Author: ed Date: Thu Jan 1 00:19:51 2009 New Revision: 186664 URL: http://svn.freebsd.org/changeset/base/186664 Log: Don't clobber sysctl_root()'s error number. When sysctl() is being called with a buffer that is too small, it will return ENOMEM. Unfortunately the changes I made the other day sets the error number to 0, because it just returns the error number of the copyout(). Revert this part of the change. Modified: head/sys/kern/kern_sysctl.c Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Wed Dec 31 23:44:34 2008 (r186663) +++ head/sys/kern/kern_sysctl.c Thu Jan 1 00:19:51 2009 (r186664) @@ -1371,8 +1371,11 @@ __sysctl(struct thread *td, struct sysct uap->new, uap->newlen, &j, 0); if (error && error != ENOMEM) return (error); - if (uap->oldlenp) - error = copyout(&j, uap->oldlenp, sizeof(j)); + if (uap->oldlenp) { + int i = copyout(&j, uap->oldlenp, sizeof(j)); + if (i) + return (i); + } return (error); } From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 00:31:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B608106566B; Thu, 1 Jan 2009 00:31:47 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 489F98FC08; Thu, 1 Jan 2009 00:31:47 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n010Vk8C039267; Thu, 1 Jan 2009 00:31:46 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n010Vk34039265; Thu, 1 Jan 2009 00:31:46 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200901010031.n010Vk34039265@svn.freebsd.org> From: Alan Cox Date: Thu, 1 Jan 2009 00:31:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186665 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 00:31:47 -0000 Author: alc Date: Thu Jan 1 00:31:46 2009 New Revision: 186665 URL: http://svn.freebsd.org/changeset/base/186665 Log: Resurrect shared map locks allowing greater concurrency during some map operations, such as page faults. An earlier version of this change was ... Reviewed by: kib Tested by: pho MFC after: 6 weeks Modified: head/sys/vm/vm_map.c head/sys/vm/vm_map.h Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Thu Jan 1 00:19:51 2009 (r186664) +++ head/sys/vm/vm_map.c Thu Jan 1 00:31:46 2009 (r186665) @@ -470,7 +470,7 @@ _vm_map_lock_read(vm_map_t map, const ch if (map->system_map) _mtx_lock_flags(&map->system_mtx, 0, file, line); else - (void)_sx_xlock(&map->lock, 0, file, line); + (void)_sx_slock(&map->lock, 0, file, line); } void @@ -480,7 +480,7 @@ _vm_map_unlock_read(vm_map_t map, const if (map->system_map) _mtx_unlock_flags(&map->system_mtx, 0, file, line); else - _sx_xunlock(&map->lock, file, line); + _sx_sunlock(&map->lock, file, line); } int @@ -503,20 +503,44 @@ _vm_map_trylock_read(vm_map_t map, const error = map->system_map ? !_mtx_trylock(&map->system_mtx, 0, file, line) : - !_sx_try_xlock(&map->lock, file, line); + !_sx_try_slock(&map->lock, file, line); return (error == 0); } +/* + * _vm_map_lock_upgrade: [ internal use only ] + * + * Tries to upgrade a read (shared) lock on the specified map to a write + * (exclusive) lock. Returns the value "0" if the upgrade succeeds and a + * non-zero value if the upgrade fails. If the upgrade fails, the map is + * returned without a read or write lock held. + * + * Requires that the map be read locked. + */ int _vm_map_lock_upgrade(vm_map_t map, const char *file, int line) { + unsigned int last_timestamp; -#ifdef INVARIANTS if (map->system_map) { +#ifdef INVARIANTS _mtx_assert(&map->system_mtx, MA_OWNED, file, line); - } else - _sx_assert(&map->lock, SX_XLOCKED, file, line); #endif + } else { + if (!_sx_try_upgrade(&map->lock, file, line)) { + last_timestamp = map->timestamp; + _sx_sunlock(&map->lock, file, line); + /* + * If the map's timestamp does not change while the + * map is unlocked, then the upgrade succeeds. + */ + (void)_sx_xlock(&map->lock, 0, file, line); + if (last_timestamp != map->timestamp) { + _sx_xunlock(&map->lock, file, line); + return (1); + } + } + } map->timestamp++; return (0); } @@ -525,12 +549,28 @@ void _vm_map_lock_downgrade(vm_map_t map, const char *file, int line) { -#ifdef INVARIANTS if (map->system_map) { +#ifdef INVARIANTS _mtx_assert(&map->system_mtx, MA_OWNED, file, line); - } else - _sx_assert(&map->lock, SX_XLOCKED, file, line); #endif + } else + _sx_downgrade(&map->lock, file, line); +} + +/* + * vm_map_locked: + * + * Returns a non-zero value if the caller holds a write (exclusive) lock + * on the specified map and the value "0" otherwise. + */ +int +vm_map_locked(vm_map_t map) +{ + + if (map->system_map) + return (mtx_owned(&map->system_mtx)); + else + return (sx_xlocked(&map->lock)); } /* @@ -902,6 +942,7 @@ vm_map_lookup_entry( vm_map_entry_t *entry) /* OUT */ { vm_map_entry_t cur; + boolean_t locked; /* * If the map is empty, then the map entry immediately preceding @@ -913,8 +954,17 @@ vm_map_lookup_entry( else if (address >= cur->start && cur->end > address) { *entry = cur; return (TRUE); - } else { + } else if ((locked = vm_map_locked(map)) || + sx_try_upgrade(&map->lock)) { + /* + * Splay requires a write lock on the map. However, it only + * restructures the binary search tree; it does not otherwise + * change the map. Thus, the map's timestamp need not change + * on a temporary upgrade. + */ map->root = cur = vm_map_entry_splay(address, cur); + if (!locked) + sx_downgrade(&map->lock); /* * If "address" is contained within a map entry, the new root @@ -927,7 +977,29 @@ vm_map_lookup_entry( return (TRUE); } else *entry = cur->prev; - } + } else + /* + * Since the map is only locked for read access, perform a + * standard binary search tree lookup for "address". + */ + for (;;) { + if (address < cur->start) { + if (cur->left == NULL) { + *entry = cur->prev; + break; + } + cur = cur->left; + } else if (cur->end > address) { + *entry = cur; + return (TRUE); + } else { + if (cur->right == NULL) { + *entry = cur; + break; + } + cur = cur->right; + } + } return (FALSE); } Modified: head/sys/vm/vm_map.h ============================================================================== --- head/sys/vm/vm_map.h Thu Jan 1 00:19:51 2009 (r186664) +++ head/sys/vm/vm_map.h Thu Jan 1 00:31:46 2009 (r186665) @@ -269,6 +269,7 @@ int _vm_map_trylock(vm_map_t map, const int _vm_map_trylock_read(vm_map_t map, const char *file, int line); int _vm_map_lock_upgrade(vm_map_t map, const char *file, int line); void _vm_map_lock_downgrade(vm_map_t map, const char *file, int line); +int vm_map_locked(vm_map_t map); int vm_map_unlock_and_wait(vm_map_t map, int timo); void vm_map_wakeup(vm_map_t map); From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 02:07:33 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D58991065677; Thu, 1 Jan 2009 02:07:32 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C13448FC17; Thu, 1 Jan 2009 02:07:32 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0127WlQ041112; Thu, 1 Jan 2009 02:07:32 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0127WUm041111; Thu, 1 Jan 2009 02:07:32 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901010207.n0127WUm041111@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 1 Jan 2009 02:07:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186666 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 02:07:33 -0000 Author: obrien Date: Thu Jan 1 02:07:32 2009 New Revision: 186666 URL: http://svn.freebsd.org/changeset/base/186666 Log: style(9) Verified with: svn diff -x -Bbw elf_common.h Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Thu Jan 1 00:31:46 2009 (r186665) +++ head/sys/sys/elf_common.h Thu Jan 1 02:07:32 2009 (r186666) @@ -27,7 +27,7 @@ */ #ifndef _SYS_ELF_COMMON_H_ -#define _SYS_ELF_COMMON_H_ 1 +#define _SYS_ELF_COMMON_H_ 1 /* * ELF definitions that are independent of architecture or word size. @@ -50,267 +50,267 @@ typedef struct { /* Indexes into the e_ident array. Keep synced with http://www.sco.com/developers/gabi/latest/ch4.eheader.html */ -#define EI_MAG0 0 /* Magic number, byte 0. */ -#define EI_MAG1 1 /* Magic number, byte 1. */ -#define EI_MAG2 2 /* Magic number, byte 2. */ -#define EI_MAG3 3 /* Magic number, byte 3. */ -#define EI_CLASS 4 /* Class of machine. */ -#define EI_DATA 5 /* Data format. */ -#define EI_VERSION 6 /* ELF format version. */ -#define EI_OSABI 7 /* Operating system / ABI identification */ -#define EI_ABIVERSION 8 /* ABI version */ -#define OLD_EI_BRAND 8 /* Start of architecture identification. */ -#define EI_PAD 9 /* Start of padding (per SVR4 ABI). */ -#define EI_NIDENT 16 /* Size of e_ident array. */ +#define EI_MAG0 0 /* Magic number, byte 0. */ +#define EI_MAG1 1 /* Magic number, byte 1. */ +#define EI_MAG2 2 /* Magic number, byte 2. */ +#define EI_MAG3 3 /* Magic number, byte 3. */ +#define EI_CLASS 4 /* Class of machine. */ +#define EI_DATA 5 /* Data format. */ +#define EI_VERSION 6 /* ELF format version. */ +#define EI_OSABI 7 /* Operating system / ABI identification */ +#define EI_ABIVERSION 8 /* ABI version */ +#define OLD_EI_BRAND 8 /* Start of architecture identification. */ +#define EI_PAD 9 /* Start of padding (per SVR4 ABI). */ +#define EI_NIDENT 16 /* Size of e_ident array. */ /* Values for the magic number bytes. */ -#define ELFMAG0 0x7f -#define ELFMAG1 'E' -#define ELFMAG2 'L' -#define ELFMAG3 'F' -#define ELFMAG "\177ELF" /* magic string */ -#define SELFMAG 4 /* magic string size */ +#define ELFMAG0 0x7f +#define ELFMAG1 'E' +#define ELFMAG2 'L' +#define ELFMAG3 'F' +#define ELFMAG "\177ELF" /* magic string */ +#define SELFMAG 4 /* magic string size */ /* Values for e_ident[EI_VERSION] and e_version. */ -#define EV_NONE 0 -#define EV_CURRENT 1 +#define EV_NONE 0 +#define EV_CURRENT 1 /* Values for e_ident[EI_CLASS]. */ -#define ELFCLASSNONE 0 /* Unknown class. */ -#define ELFCLASS32 1 /* 32-bit architecture. */ -#define ELFCLASS64 2 /* 64-bit architecture. */ +#define ELFCLASSNONE 0 /* Unknown class. */ +#define ELFCLASS32 1 /* 32-bit architecture. */ +#define ELFCLASS64 2 /* 64-bit architecture. */ /* Values for e_ident[EI_DATA]. */ -#define ELFDATANONE 0 /* Unknown data format. */ -#define ELFDATA2LSB 1 /* 2's complement little-endian. */ -#define ELFDATA2MSB 2 /* 2's complement big-endian. */ +#define ELFDATANONE 0 /* Unknown data format. */ +#define ELFDATA2LSB 1 /* 2's complement little-endian. */ +#define ELFDATA2MSB 2 /* 2's complement big-endian. */ /* Values for e_ident[EI_OSABI]. */ -#define ELFOSABI_NONE 0 /* UNIX System V ABI */ -#define ELFOSABI_HPUX 1 /* HP-UX operating system */ -#define ELFOSABI_NETBSD 2 /* NetBSD */ -#define ELFOSABI_LINUX 3 /* GNU/Linux */ -#define ELFOSABI_HURD 4 /* GNU/Hurd */ -#define ELFOSABI_86OPEN 5 /* 86Open common IA32 ABI */ -#define ELFOSABI_SOLARIS 6 /* Solaris */ -#define ELFOSABI_AIX 7 /* AIX */ -#define ELFOSABI_IRIX 8 /* IRIX */ -#define ELFOSABI_FREEBSD 9 /* FreeBSD */ -#define ELFOSABI_TRU64 10 /* TRU64 UNIX */ -#define ELFOSABI_MODESTO 11 /* Novell Modesto */ -#define ELFOSABI_OPENBSD 12 /* OpenBSD */ -#define ELFOSABI_OPENVMS 13 /* Open VMS */ -#define ELFOSABI_NSK 14 /* HP Non-Stop Kernel */ -#define ELFOSABI_AROS 15 /* Amiga Research OS */ -#define ELFOSABI_ARM 97 /* ARM */ -#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ +#define ELFOSABI_NONE 0 /* UNIX System V ABI */ +#define ELFOSABI_HPUX 1 /* HP-UX operating system */ +#define ELFOSABI_NETBSD 2 /* NetBSD */ +#define ELFOSABI_LINUX 3 /* GNU/Linux */ +#define ELFOSABI_HURD 4 /* GNU/Hurd */ +#define ELFOSABI_86OPEN 5 /* 86Open common IA32 ABI */ +#define ELFOSABI_SOLARIS 6 /* Solaris */ +#define ELFOSABI_AIX 7 /* AIX */ +#define ELFOSABI_IRIX 8 /* IRIX */ +#define ELFOSABI_FREEBSD 9 /* FreeBSD */ +#define ELFOSABI_TRU64 10 /* TRU64 UNIX */ +#define ELFOSABI_MODESTO 11 /* Novell Modesto */ +#define ELFOSABI_OPENBSD 12 /* OpenBSD */ +#define ELFOSABI_OPENVMS 13 /* Open VMS */ +#define ELFOSABI_NSK 14 /* HP Non-Stop Kernel */ +#define ELFOSABI_AROS 15 /* Amiga Research OS */ +#define ELFOSABI_ARM 97 /* ARM */ +#define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */ -#define ELFOSABI_SYSV ELFOSABI_NONE /* symbol used in old spec */ -#define ELFOSABI_MONTEREY ELFOSABI_AIX /* Monterey */ +#define ELFOSABI_SYSV ELFOSABI_NONE /* symbol used in old spec */ +#define ELFOSABI_MONTEREY ELFOSABI_AIX /* Monterey */ /* e_ident */ -#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \ +#define IS_ELF(ehdr) ((ehdr).e_ident[EI_MAG0] == ELFMAG0 && \ (ehdr).e_ident[EI_MAG1] == ELFMAG1 && \ (ehdr).e_ident[EI_MAG2] == ELFMAG2 && \ (ehdr).e_ident[EI_MAG3] == ELFMAG3) /* Values for e_type. */ -#define ET_NONE 0 /* Unknown type. */ -#define ET_REL 1 /* Relocatable. */ -#define ET_EXEC 2 /* Executable. */ -#define ET_DYN 3 /* Shared object. */ -#define ET_CORE 4 /* Core file. */ -#define ET_LOOS 0xfe00 /* First operating system specific. */ -#define ET_HIOS 0xfeff /* Last operating system-specific. */ -#define ET_LOPROC 0xff00 /* First processor-specific. */ -#define ET_HIPROC 0xffff /* Last processor-specific. */ +#define ET_NONE 0 /* Unknown type. */ +#define ET_REL 1 /* Relocatable. */ +#define ET_EXEC 2 /* Executable. */ +#define ET_DYN 3 /* Shared object. */ +#define ET_CORE 4 /* Core file. */ +#define ET_LOOS 0xfe00 /* First operating system specific. */ +#define ET_HIOS 0xfeff /* Last operating system-specific. */ +#define ET_LOPROC 0xff00 /* First processor-specific. */ +#define ET_HIPROC 0xffff /* Last processor-specific. */ /* Values for e_machine. */ -#define EM_NONE 0 /* Unknown machine. */ -#define EM_M32 1 /* AT&T WE32100. */ -#define EM_SPARC 2 /* Sun SPARC. */ -#define EM_386 3 /* Intel i386. */ -#define EM_68K 4 /* Motorola 68000. */ -#define EM_88K 5 /* Motorola 88000. */ -#define EM_860 7 /* Intel i860. */ -#define EM_MIPS 8 /* MIPS R3000 Big-Endian only. */ -#define EM_S370 9 /* IBM System/370. */ -#define EM_MIPS_RS3_LE 10 /* MIPS R3000 Little-Endian. */ -#define EM_PARISC 15 /* HP PA-RISC. */ -#define EM_VPP500 17 /* Fujitsu VPP500. */ -#define EM_SPARC32PLUS 18 /* SPARC v8plus. */ -#define EM_960 19 /* Intel 80960. */ -#define EM_PPC 20 /* PowerPC 32-bit. */ -#define EM_PPC64 21 /* PowerPC 64-bit. */ -#define EM_S390 22 /* IBM System/390. */ -#define EM_V800 36 /* NEC V800. */ -#define EM_FR20 37 /* Fujitsu FR20. */ -#define EM_RH32 38 /* TRW RH-32. */ -#define EM_RCE 39 /* Motorola RCE. */ -#define EM_ARM 40 /* ARM. */ -#define EM_SH 42 /* Hitachi SH. */ -#define EM_SPARCV9 43 /* SPARC v9 64-bit. */ -#define EM_TRICORE 44 /* Siemens TriCore embedded processor. */ -#define EM_ARC 45 /* Argonaut RISC Core. */ -#define EM_H8_300 46 /* Hitachi H8/300. */ -#define EM_H8_300H 47 /* Hitachi H8/300H. */ -#define EM_H8S 48 /* Hitachi H8S. */ -#define EM_H8_500 49 /* Hitachi H8/500. */ -#define EM_IA_64 50 /* Intel IA-64 Processor. */ -#define EM_MIPS_X 51 /* Stanford MIPS-X. */ -#define EM_COLDFIRE 52 /* Motorola ColdFire. */ -#define EM_68HC12 53 /* Motorola M68HC12. */ -#define EM_MMA 54 /* Fujitsu MMA. */ -#define EM_PCP 55 /* Siemens PCP. */ -#define EM_NCPU 56 /* Sony nCPU. */ -#define EM_NDR1 57 /* Denso NDR1 microprocessor. */ -#define EM_STARCORE 58 /* Motorola Star*Core processor. */ -#define EM_ME16 59 /* Toyota ME16 processor. */ -#define EM_ST100 60 /* STMicroelectronics ST100 processor. */ -#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ processor. */ -#define EM_X86_64 62 /* Advanced Micro Devices x86-64 */ +#define EM_NONE 0 /* Unknown machine. */ +#define EM_M32 1 /* AT&T WE32100. */ +#define EM_SPARC 2 /* Sun SPARC. */ +#define EM_386 3 /* Intel i386. */ +#define EM_68K 4 /* Motorola 68000. */ +#define EM_88K 5 /* Motorola 88000. */ +#define EM_860 7 /* Intel i860. */ +#define EM_MIPS 8 /* MIPS R3000 Big-Endian only. */ +#define EM_S370 9 /* IBM System/370. */ +#define EM_MIPS_RS3_LE 10 /* MIPS R3000 Little-Endian. */ +#define EM_PARISC 15 /* HP PA-RISC. */ +#define EM_VPP500 17 /* Fujitsu VPP500. */ +#define EM_SPARC32PLUS 18 /* SPARC v8plus. */ +#define EM_960 19 /* Intel 80960. */ +#define EM_PPC 20 /* PowerPC 32-bit. */ +#define EM_PPC64 21 /* PowerPC 64-bit. */ +#define EM_S390 22 /* IBM System/390. */ +#define EM_V800 36 /* NEC V800. */ +#define EM_FR20 37 /* Fujitsu FR20. */ +#define EM_RH32 38 /* TRW RH-32. */ +#define EM_RCE 39 /* Motorola RCE. */ +#define EM_ARM 40 /* ARM. */ +#define EM_SH 42 /* Hitachi SH. */ +#define EM_SPARCV9 43 /* SPARC v9 64-bit. */ +#define EM_TRICORE 44 /* Siemens TriCore embedded processor. */ +#define EM_ARC 45 /* Argonaut RISC Core. */ +#define EM_H8_300 46 /* Hitachi H8/300. */ +#define EM_H8_300H 47 /* Hitachi H8/300H. */ +#define EM_H8S 48 /* Hitachi H8S. */ +#define EM_H8_500 49 /* Hitachi H8/500. */ +#define EM_IA_64 50 /* Intel IA-64 Processor. */ +#define EM_MIPS_X 51 /* Stanford MIPS-X. */ +#define EM_COLDFIRE 52 /* Motorola ColdFire. */ +#define EM_68HC12 53 /* Motorola M68HC12. */ +#define EM_MMA 54 /* Fujitsu MMA. */ +#define EM_PCP 55 /* Siemens PCP. */ +#define EM_NCPU 56 /* Sony nCPU. */ +#define EM_NDR1 57 /* Denso NDR1 microprocessor. */ +#define EM_STARCORE 58 /* Motorola Star*Core processor. */ +#define EM_ME16 59 /* Toyota ME16 processor. */ +#define EM_ST100 60 /* STMicroelectronics ST100 processor. */ +#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ processor. */ +#define EM_X86_64 62 /* Advanced Micro Devices x86-64 */ #define EM_AMD64 EM_X86_64 /* Advanced Micro Devices x86-64 (compat) */ -#define EM_PDSP 63 /* Sony DSP Processor. */ -#define EM_FX66 66 /* Siemens FX66 microcontroller. */ -#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 +#define EM_PDSP 63 /* Sony DSP Processor. */ +#define EM_FX66 66 /* Siemens FX66 microcontroller. */ +#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 microcontroller. */ -#define EM_ST7 68 /* STmicroelectronics ST7 8-bit +#define EM_ST7 68 /* STmicroelectronics ST7 8-bit microcontroller. */ -#define EM_68HC16 69 /* Motorola MC68HC16 microcontroller. */ -#define EM_68HC11 70 /* Motorola MC68HC11 microcontroller. */ -#define EM_68HC08 71 /* Motorola MC68HC08 microcontroller. */ -#define EM_68HC05 72 /* Motorola MC68HC05 microcontroller. */ -#define EM_SVX 73 /* Silicon Graphics SVx. */ -#define EM_ST19 74 /* STMicroelectronics ST19 8-bit mc. */ -#define EM_VAX 75 /* Digital VAX. */ -#define EM_CRIS 76 /* Axis Communications 32-bit embedded +#define EM_68HC16 69 /* Motorola MC68HC16 microcontroller. */ +#define EM_68HC11 70 /* Motorola MC68HC11 microcontroller. */ +#define EM_68HC08 71 /* Motorola MC68HC08 microcontroller. */ +#define EM_68HC05 72 /* Motorola MC68HC05 microcontroller. */ +#define EM_SVX 73 /* Silicon Graphics SVx. */ +#define EM_ST19 74 /* STMicroelectronics ST19 8-bit mc. */ +#define EM_VAX 75 /* Digital VAX. */ +#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor. */ -#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded +#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded processor. */ -#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor. */ -#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor. */ -#define EM_MMIX 80 /* Donald Knuth's educational 64-bit proc. */ -#define EM_HUANY 81 /* Harvard University machine-independent +#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor. */ +#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor. */ +#define EM_MMIX 80 /* Donald Knuth's educational 64-bit proc. */ +#define EM_HUANY 81 /* Harvard University machine-independent object files. */ -#define EM_PRISM 82 /* SiTera Prism. */ -#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller. */ -#define EM_FR30 84 /* Fujitsu FR30. */ -#define EM_D10V 85 /* Mitsubishi D10V. */ -#define EM_D30V 86 /* Mitsubishi D30V. */ -#define EM_V850 87 /* NEC v850. */ -#define EM_M32R 88 /* Mitsubishi M32R. */ -#define EM_MN10300 89 /* Matsushita MN10300. */ -#define EM_MN10200 90 /* Matsushita MN10200. */ -#define EM_PJ 91 /* picoJava. */ -#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor. */ -#define EM_ARC_A5 93 /* ARC Cores Tangent-A5. */ -#define EM_XTENSA 94 /* Tensilica Xtensa Architecture. */ -#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor. */ -#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose +#define EM_PRISM 82 /* SiTera Prism. */ +#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller. */ +#define EM_FR30 84 /* Fujitsu FR30. */ +#define EM_D10V 85 /* Mitsubishi D10V. */ +#define EM_D30V 86 /* Mitsubishi D30V. */ +#define EM_V850 87 /* NEC v850. */ +#define EM_M32R 88 /* Mitsubishi M32R. */ +#define EM_MN10300 89 /* Matsushita MN10300. */ +#define EM_MN10200 90 /* Matsushita MN10200. */ +#define EM_PJ 91 /* picoJava. */ +#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor. */ +#define EM_ARC_A5 93 /* ARC Cores Tangent-A5. */ +#define EM_XTENSA 94 /* Tensilica Xtensa Architecture. */ +#define EM_VIDEOCORE 95 /* Alphamosaic VideoCore processor. */ +#define EM_TMM_GPP 96 /* Thompson Multimedia General Purpose Processor. */ -#define EM_NS32K 97 /* National Semiconductor 32000 series. */ -#define EM_TPC 98 /* Tenor Network TPC processor. */ -#define EM_SNP1K 99 /* Trebia SNP 1000 processor. */ -#define EM_ST200 100 /* STMicroelectronics ST200 microcontroller. */ -#define EM_IP2K 101 /* Ubicom IP2xxx microcontroller family. */ -#define EM_MAX 102 /* MAX Processor. */ -#define EM_CR 103 /* National Semiconductor CompactRISC +#define EM_NS32K 97 /* National Semiconductor 32000 series. */ +#define EM_TPC 98 /* Tenor Network TPC processor. */ +#define EM_SNP1K 99 /* Trebia SNP 1000 processor. */ +#define EM_ST200 100 /* STMicroelectronics ST200 microcontroller. */ +#define EM_IP2K 101 /* Ubicom IP2xxx microcontroller family. */ +#define EM_MAX 102 /* MAX Processor. */ +#define EM_CR 103 /* National Semiconductor CompactRISC microprocessor. */ -#define EM_F2MC16 104 /* Fujitsu F2MC16. */ -#define EM_MSP430 105 /* Texas Instruments embedded microcontroller +#define EM_F2MC16 104 /* Fujitsu F2MC16. */ +#define EM_MSP430 105 /* Texas Instruments embedded microcontroller msp430. */ -#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor. */ -#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors. */ -#define EM_SEP 108 /* Sharp embedded microprocessor. */ -#define EM_ARCA 109 /* Arca RISC Microprocessor. */ -#define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. +#define EM_BLACKFIN 106 /* Analog Devices Blackfin (DSP) processor. */ +#define EM_SE_C33 107 /* S1C33 Family of Seiko Epson processors. */ +#define EM_SEP 108 /* Sharp embedded microprocessor. */ +#define EM_ARCA 109 /* Arca RISC Microprocessor. */ +#define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. and MPRC of Peking University */ /* Non-standard or deprecated. */ -#define EM_486 6 /* Intel i486. */ -#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */ -#define EM_ALPHA_STD 41 /* Digital Alpha (standard value). */ -#define EM_ALPHA 0x9026 /* Alpha (written in the absence of an ABI) */ +#define EM_486 6 /* Intel i486. */ +#define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */ +#define EM_ALPHA_STD 41 /* Digital Alpha (standard value). */ +#define EM_ALPHA 0x9026 /* Alpha (written in the absence of an ABI) */ /* Special section indexes. */ -#define SHN_UNDEF 0 /* Undefined, missing, irrelevant. */ -#define SHN_LORESERVE 0xff00 /* First of reserved range. */ -#define SHN_LOPROC 0xff00 /* First processor-specific. */ -#define SHN_HIPROC 0xff1f /* Last processor-specific. */ -#define SHN_LOOS 0xff20 /* First operating system-specific. */ -#define SHN_HIOS 0xff3f /* Last operating system-specific. */ -#define SHN_ABS 0xfff1 /* Absolute values. */ -#define SHN_COMMON 0xfff2 /* Common data. */ -#define SHN_XINDEX 0xffff /* Escape -- index stored elsewhere. */ -#define SHN_HIRESERVE 0xffff /* Last of reserved range. */ +#define SHN_UNDEF 0 /* Undefined, missing, irrelevant. */ +#define SHN_LORESERVE 0xff00 /* First of reserved range. */ +#define SHN_LOPROC 0xff00 /* First processor-specific. */ +#define SHN_HIPROC 0xff1f /* Last processor-specific. */ +#define SHN_LOOS 0xff20 /* First operating system-specific. */ +#define SHN_HIOS 0xff3f /* Last operating system-specific. */ +#define SHN_ABS 0xfff1 /* Absolute values. */ +#define SHN_COMMON 0xfff2 /* Common data. */ +#define SHN_XINDEX 0xffff /* Escape -- index stored elsewhere. */ +#define SHN_HIRESERVE 0xffff /* Last of reserved range. */ /* sh_type */ -#define SHT_NULL 0 /* inactive */ -#define SHT_PROGBITS 1 /* program defined information */ -#define SHT_SYMTAB 2 /* symbol table section */ -#define SHT_STRTAB 3 /* string table section */ -#define SHT_RELA 4 /* relocation section with addends */ -#define SHT_HASH 5 /* symbol hash table section */ -#define SHT_DYNAMIC 6 /* dynamic section */ -#define SHT_NOTE 7 /* note section */ -#define SHT_NOBITS 8 /* no space section */ -#define SHT_REL 9 /* relocation section - no addends */ -#define SHT_SHLIB 10 /* reserved - purpose unknown */ -#define SHT_DYNSYM 11 /* dynamic symbol table section */ -#define SHT_INIT_ARRAY 14 /* Initialization function pointers. */ -#define SHT_FINI_ARRAY 15 /* Termination function pointers. */ -#define SHT_PREINIT_ARRAY 16 /* Pre-initialization function ptrs. */ -#define SHT_GROUP 17 /* Section group. */ -#define SHT_SYMTAB_SHNDX 18 /* Section indexes (see SHN_XINDEX). */ -#define SHT_LOOS 0x60000000 /* First of OS specific semantics */ -#define SHT_LOSUNW 0x6ffffff4 -#define SHT_SUNW_dof 0x6ffffff4 -#define SHT_SUNW_cap 0x6ffffff5 -#define SHT_SUNW_SIGNATURE 0x6ffffff6 -#define SHT_SUNW_ANNOTATE 0x6ffffff7 -#define SHT_SUNW_DEBUGSTR 0x6ffffff8 -#define SHT_SUNW_DEBUG 0x6ffffff9 -#define SHT_SUNW_move 0x6ffffffa -#define SHT_SUNW_COMDAT 0x6ffffffb -#define SHT_SUNW_syminfo 0x6ffffffc -#define SHT_SUNW_verdef 0x6ffffffd -#define SHT_GNU_verdef 0x6ffffffd /* Symbol versions provided */ -#define SHT_SUNW_verneed 0x6ffffffe -#define SHT_GNU_verneed 0x6ffffffe /* Symbol versions required */ -#define SHT_SUNW_versym 0x6fffffff -#define SHT_GNU_versym 0x6fffffff /* Symbol version table */ -#define SHT_HISUNW 0x6fffffff -#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ -#define SHT_LOPROC 0x70000000 /* reserved range for processor */ -#define SHT_AMD64_UNWIND 0x70000001 /* unwind information */ -#define SHT_HIPROC 0x7fffffff /* specific section header types */ -#define SHT_LOUSER 0x80000000 /* reserved range for application */ -#define SHT_HIUSER 0xffffffff /* specific indexes */ +#define SHT_NULL 0 /* inactive */ +#define SHT_PROGBITS 1 /* program defined information */ +#define SHT_SYMTAB 2 /* symbol table section */ +#define SHT_STRTAB 3 /* string table section */ +#define SHT_RELA 4 /* relocation section with addends */ +#define SHT_HASH 5 /* symbol hash table section */ +#define SHT_DYNAMIC 6 /* dynamic section */ +#define SHT_NOTE 7 /* note section */ +#define SHT_NOBITS 8 /* no space section */ +#define SHT_REL 9 /* relocation section - no addends */ +#define SHT_SHLIB 10 /* reserved - purpose unknown */ +#define SHT_DYNSYM 11 /* dynamic symbol table section */ +#define SHT_INIT_ARRAY 14 /* Initialization function pointers. */ +#define SHT_FINI_ARRAY 15 /* Termination function pointers. */ +#define SHT_PREINIT_ARRAY 16 /* Pre-initialization function ptrs. */ +#define SHT_GROUP 17 /* Section group. */ +#define SHT_SYMTAB_SHNDX 18 /* Section indexes (see SHN_XINDEX). */ +#define SHT_LOOS 0x60000000 /* First of OS specific semantics */ +#define SHT_LOSUNW 0x6ffffff4 +#define SHT_SUNW_dof 0x6ffffff4 +#define SHT_SUNW_cap 0x6ffffff5 +#define SHT_SUNW_SIGNATURE 0x6ffffff6 +#define SHT_SUNW_ANNOTATE 0x6ffffff7 +#define SHT_SUNW_DEBUGSTR 0x6ffffff8 +#define SHT_SUNW_DEBUG 0x6ffffff9 +#define SHT_SUNW_move 0x6ffffffa +#define SHT_SUNW_COMDAT 0x6ffffffb +#define SHT_SUNW_syminfo 0x6ffffffc +#define SHT_SUNW_verdef 0x6ffffffd +#define SHT_GNU_verdef 0x6ffffffd /* Symbol versions provided */ +#define SHT_SUNW_verneed 0x6ffffffe +#define SHT_GNU_verneed 0x6ffffffe /* Symbol versions required */ +#define SHT_SUNW_versym 0x6fffffff +#define SHT_GNU_versym 0x6fffffff /* Symbol version table */ +#define SHT_HISUNW 0x6fffffff +#define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ +#define SHT_LOPROC 0x70000000 /* reserved range for processor */ +#define SHT_AMD64_UNWIND 0x70000001 /* unwind information */ +#define SHT_HIPROC 0x7fffffff /* specific section header types */ +#define SHT_LOUSER 0x80000000 /* reserved range for application */ +#define SHT_HIUSER 0xffffffff /* specific indexes */ /* Flags for sh_flags. */ -#define SHF_WRITE 0x1 /* Section contains writable data. */ -#define SHF_ALLOC 0x2 /* Section occupies memory. */ -#define SHF_EXECINSTR 0x4 /* Section contains instructions. */ -#define SHF_MERGE 0x10 /* Section may be merged. */ -#define SHF_STRINGS 0x20 /* Section contains strings. */ -#define SHF_INFO_LINK 0x40 /* sh_info holds section index. */ -#define SHF_LINK_ORDER 0x80 /* Special ordering requirements. */ -#define SHF_OS_NONCONFORMING 0x100 /* OS-specific processing required. */ -#define SHF_GROUP 0x200 /* Member of section group. */ -#define SHF_TLS 0x400 /* Section contains TLS data. */ -#define SHF_MASKOS 0x0ff00000 /* OS-specific semantics. */ -#define SHF_MASKPROC 0xf0000000 /* Processor-specific semantics. */ +#define SHF_WRITE 0x1 /* Section contains writable data. */ +#define SHF_ALLOC 0x2 /* Section occupies memory. */ +#define SHF_EXECINSTR 0x4 /* Section contains instructions. */ +#define SHF_MERGE 0x10 /* Section may be merged. */ +#define SHF_STRINGS 0x20 /* Section contains strings. */ +#define SHF_INFO_LINK 0x40 /* sh_info holds section index. */ +#define SHF_LINK_ORDER 0x80 /* Special ordering requirements. */ +#define SHF_OS_NONCONFORMING 0x100 /* OS-specific processing required. */ +#define SHF_GROUP 0x200 /* Member of section group. */ +#define SHF_TLS 0x400 /* Section contains TLS data. */ +#define SHF_MASKOS 0x0ff00000 /* OS-specific semantics. */ +#define SHF_MASKPROC 0xf0000000 /* Processor-specific semantics. */ /* Values for p_type. */ -#define PT_NULL 0 /* Unused entry. */ -#define PT_LOAD 1 /* Loadable segment. */ -#define PT_DYNAMIC 2 /* Dynamic linking information segment. */ -#define PT_INTERP 3 /* Pathname of interpreter. */ -#define PT_NOTE 4 /* Auxiliary information. */ -#define PT_SHLIB 5 /* Reserved (not used). */ -#define PT_PHDR 6 /* Location of program header itself. */ +#define PT_NULL 0 /* Unused entry. */ +#define PT_LOAD 1 /* Loadable segment. */ +#define PT_DYNAMIC 2 /* Dynamic linking information segment. */ +#define PT_INTERP 3 /* Pathname of interpreter. */ +#define PT_NOTE 4 /* Auxiliary information. */ +#define PT_SHLIB 5 /* Reserved (not used). */ +#define PT_PHDR 6 /* Location of program header itself. */ #define PT_TLS 7 /* Thread local storage segment */ -#define PT_LOOS 0x60000000 /* First OS-specific. */ +#define PT_LOOS 0x60000000 /* First OS-specific. */ #define PT_SUNW_UNWIND 0x6464e550 /* amd64 UNWIND program header */ #define PT_GNU_EH_FRAME 0x6474e550 #define PT_LOSUNW 0x6ffffffa @@ -319,48 +319,48 @@ typedef struct { #define PT_SUNWDTRACE 0x6ffffffc /* private */ #define PT_SUNWCAP 0x6ffffffd /* hard/soft capabilities segment */ #define PT_HISUNW 0x6fffffff -#define PT_HIOS 0x6fffffff /* Last OS-specific. */ -#define PT_LOPROC 0x70000000 /* First processor-specific type. */ -#define PT_HIPROC 0x7fffffff /* Last processor-specific type. */ +#define PT_HIOS 0x6fffffff /* Last OS-specific. */ +#define PT_LOPROC 0x70000000 /* First processor-specific type. */ +#define PT_HIPROC 0x7fffffff /* Last processor-specific type. */ /* Values for p_flags. */ -#define PF_X 0x1 /* Executable. */ -#define PF_W 0x2 /* Writable. */ -#define PF_R 0x4 /* Readable. */ -#define PF_MASKOS 0x0ff00000 /* Operating system-specific. */ -#define PF_MASKPROC 0xf0000000 /* Processor-specific. */ +#define PF_X 0x1 /* Executable. */ +#define PF_W 0x2 /* Writable. */ +#define PF_R 0x4 /* Readable. */ +#define PF_MASKOS 0x0ff00000 /* Operating system-specific. */ +#define PF_MASKPROC 0xf0000000 /* Processor-specific. */ /* Extended program header index. */ #define PN_XNUM 0xffff /* Values for d_tag. */ -#define DT_NULL 0 /* Terminating entry. */ -#define DT_NEEDED 1 /* String table offset of a needed shared +#define DT_NULL 0 /* Terminating entry. */ +#define DT_NEEDED 1 /* String table offset of a needed shared library. */ -#define DT_PLTRELSZ 2 /* Total size in bytes of PLT relocations. */ -#define DT_PLTGOT 3 /* Processor-dependent address. */ -#define DT_HASH 4 /* Address of symbol hash table. */ -#define DT_STRTAB 5 /* Address of string table. */ -#define DT_SYMTAB 6 /* Address of symbol table. */ -#define DT_RELA 7 /* Address of ElfNN_Rela relocations. */ -#define DT_RELASZ 8 /* Total size of ElfNN_Rela relocations. */ -#define DT_RELAENT 9 /* Size of each ElfNN_Rela relocation entry. */ -#define DT_STRSZ 10 /* Size of string table. */ -#define DT_SYMENT 11 /* Size of each symbol table entry. */ -#define DT_INIT 12 /* Address of initialization function. */ -#define DT_FINI 13 /* Address of finalization function. */ -#define DT_SONAME 14 /* String table offset of shared object +#define DT_PLTRELSZ 2 /* Total size in bytes of PLT relocations. */ +#define DT_PLTGOT 3 /* Processor-dependent address. */ +#define DT_HASH 4 /* Address of symbol hash table. */ +#define DT_STRTAB 5 /* Address of string table. */ +#define DT_SYMTAB 6 /* Address of symbol table. */ +#define DT_RELA 7 /* Address of ElfNN_Rela relocations. */ +#define DT_RELASZ 8 /* Total size of ElfNN_Rela relocations. */ +#define DT_RELAENT 9 /* Size of each ElfNN_Rela relocation entry. */ +#define DT_STRSZ 10 /* Size of string table. */ +#define DT_SYMENT 11 /* Size of each symbol table entry. */ +#define DT_INIT 12 /* Address of initialization function. */ +#define DT_FINI 13 /* Address of finalization function. */ +#define DT_SONAME 14 /* String table offset of shared object name. */ -#define DT_RPATH 15 /* String table offset of library path. [sup] */ -#define DT_SYMBOLIC 16 /* Indicates "symbolic" linking. [sup] */ -#define DT_REL 17 /* Address of ElfNN_Rel relocations. */ -#define DT_RELSZ 18 /* Total size of ElfNN_Rel relocations. */ -#define DT_RELENT 19 /* Size of each ElfNN_Rel relocation. */ -#define DT_PLTREL 20 /* Type of relocation used for PLT. */ -#define DT_DEBUG 21 /* Reserved (not used). */ -#define DT_TEXTREL 22 /* Indicates there may be relocations in +#define DT_RPATH 15 /* String table offset of library path. [sup] */ +#define DT_SYMBOLIC 16 /* Indicates "symbolic" linking. [sup] */ +#define DT_REL 17 /* Address of ElfNN_Rel relocations. */ +#define DT_RELSZ 18 /* Total size of ElfNN_Rel relocations. */ +#define DT_RELENT 19 /* Size of each ElfNN_Rel relocation. */ +#define DT_PLTREL 20 /* Type of relocation used for PLT. */ +#define DT_DEBUG 21 /* Reserved (not used). */ +#define DT_TEXTREL 22 /* Indicates there may be relocations in non-writable segments. [sup] */ -#define DT_JMPREL 23 /* Address of PLT relocations. */ +#define DT_JMPREL 23 /* Address of PLT relocations. */ #define DT_BIND_NOW 24 /* [sup] */ #define DT_INIT_ARRAY 25 /* Address of the array of pointers to initialization functions */ @@ -455,63 +455,63 @@ typedef struct { thread-local storage scheme. */ /* Values for n_type. Used in core files. */ -#define NT_PRSTATUS 1 /* Process status. */ -#define NT_FPREGSET 2 /* Floating point registers. */ -#define NT_PRPSINFO 3 /* Process state info. */ +#define NT_PRSTATUS 1 /* Process status. */ +#define NT_FPREGSET 2 /* Floating point registers. */ +#define NT_PRPSINFO 3 /* Process state info. */ /* Symbol Binding - ELFNN_ST_BIND - st_info */ -#define STB_LOCAL 0 /* Local symbol */ -#define STB_GLOBAL 1 /* Global symbol */ -#define STB_WEAK 2 /* like global - lower precedence */ -#define STB_LOOS 10 /* Reserved range for operating system */ -#define STB_HIOS 12 /* specific semantics. */ -#define STB_LOPROC 13 /* reserved range for processor */ -#define STB_HIPROC 15 /* specific semantics. */ +#define STB_LOCAL 0 /* Local symbol */ +#define STB_GLOBAL 1 /* Global symbol */ +#define STB_WEAK 2 /* like global - lower precedence */ +#define STB_LOOS 10 /* Reserved range for operating system */ +#define STB_HIOS 12 /* specific semantics. */ +#define STB_LOPROC 13 /* reserved range for processor */ +#define STB_HIPROC 15 /* specific semantics. */ /* Symbol type - ELFNN_ST_TYPE - st_info */ -#define STT_NOTYPE 0 /* Unspecified type. */ -#define STT_OBJECT 1 /* Data object. */ -#define STT_FUNC 2 /* Function. */ -#define STT_SECTION 3 /* Section. */ -#define STT_FILE 4 /* Source file. */ -#define STT_COMMON 5 /* Uninitialized common block. */ -#define STT_TLS 6 /* TLS object. */ -#define STT_NUM 7 -#define STT_LOOS 10 /* Reserved range for operating system */ -#define STT_HIOS 12 /* specific semantics. */ -#define STT_LOPROC 13 /* reserved range for processor */ -#define STT_HIPROC 15 /* specific semantics. */ +#define STT_NOTYPE 0 /* Unspecified type. */ +#define STT_OBJECT 1 /* Data object. */ +#define STT_FUNC 2 /* Function. */ +#define STT_SECTION 3 /* Section. */ +#define STT_FILE 4 /* Source file. */ +#define STT_COMMON 5 /* Uninitialized common block. */ +#define STT_TLS 6 /* TLS object. */ +#define STT_NUM 7 +#define STT_LOOS 10 /* Reserved range for operating system */ +#define STT_HIOS 12 /* specific semantics. */ +#define STT_LOPROC 13 /* reserved range for processor */ +#define STT_HIPROC 15 /* specific semantics. */ /* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */ -#define STV_DEFAULT 0x0 /* Default visibility (see binding). */ -#define STV_INTERNAL 0x1 /* Special meaning in relocatable objects. */ -#define STV_HIDDEN 0x2 /* Not visible. */ -#define STV_PROTECTED 0x3 /* Visible but not preemptible. */ -#define STV_EXPORTED 0x4 -#define STV_SINGLETON 0x5 -#define STV_ELIMINATE 0x6 +#define STV_DEFAULT 0x0 /* Default visibility (see binding). */ +#define STV_INTERNAL 0x1 /* Special meaning in relocatable objects. */ +#define STV_HIDDEN 0x2 /* Not visible. */ +#define STV_PROTECTED 0x3 /* Visible but not preemptible. */ +#define STV_EXPORTED 0x4 +#define STV_SINGLETON 0x5 +#define STV_ELIMINATE 0x6 /* Special symbol table indexes. */ -#define STN_UNDEF 0 /* Undefined symbol index. */ +#define STN_UNDEF 0 /* Undefined symbol index. */ /* Symbol versioning flags. */ #define VER_DEF_CURRENT 1 -#define VER_DEF_IDX(x) VER_NDX(x) +#define VER_DEF_IDX(x) VER_NDX(x) #define VER_FLG_BASE 0x01 #define VER_FLG_WEAK 0x02 #define VER_NEED_CURRENT 1 -#define VER_NEED_WEAK (1u << 15) -#define VER_NEED_HIDDEN VER_NDX_HIDDEN -#define VER_NEED_IDX(x) VER_NDX(x) +#define VER_NEED_WEAK (1u << 15) +#define VER_NEED_HIDDEN VER_NDX_HIDDEN +#define VER_NEED_IDX(x) VER_NDX(x) #define VER_NDX_LOCAL 0 #define VER_NDX_GLOBAL 1 -#define VER_NDX_GIVEN 2 +#define VER_NDX_GIVEN 2 -#define VER_NDX_HIDDEN (1u << 15) -#define VER_NDX(x) ((x) & ~(1u << 15)) +#define VER_NDX_HIDDEN (1u << 15) +#define VER_NDX(x) ((x) & ~(1u << 15)) #define CA_SUNW_NULL 0 #define CA_SUNW_HW_1 1 /* first hardware capabilities entry */ @@ -763,30 +763,30 @@ typedef struct { /* * TLS relocations */ -#define R_PPC_TLS 67 -#define R_PPC_DTPMOD32 68 -#define R_PPC_TPREL16 69 -#define R_PPC_TPREL16_LO 70 -#define R_PPC_TPREL16_HI 71 -#define R_PPC_TPREL16_HA 72 -#define R_PPC_TPREL32 73 -#define R_PPC_DTPREL16 74 -#define R_PPC_DTPREL16_LO 75 -#define R_PPC_DTPREL16_HI 76 -#define R_PPC_DTPREL16_HA 77 -#define R_PPC_DTPREL32 78 -#define R_PPC_GOT_TLSGD16 79 -#define R_PPC_GOT_TLSGD16_LO 80 -#define R_PPC_GOT_TLSGD16_HI 81 -#define R_PPC_GOT_TLSGD16_HA 82 -#define R_PPC_GOT_TLSLD16 83 -#define R_PPC_GOT_TLSLD16_LO 84 -#define R_PPC_GOT_TLSLD16_HI 85 -#define R_PPC_GOT_TLSLD16_HA 86 -#define R_PPC_GOT_TPREL16 87 -#define R_PPC_GOT_TPREL16_LO 88 -#define R_PPC_GOT_TPREL16_HI 89 -#define R_PPC_GOT_TPREL16_HA 90 +#define R_PPC_TLS 67 +#define R_PPC_DTPMOD32 68 +#define R_PPC_TPREL16 69 +#define R_PPC_TPREL16_LO 70 +#define R_PPC_TPREL16_HI 71 +#define R_PPC_TPREL16_HA 72 +#define R_PPC_TPREL32 73 +#define R_PPC_DTPREL16 74 +#define R_PPC_DTPREL16_LO 75 +#define R_PPC_DTPREL16_HI 76 +#define R_PPC_DTPREL16_HA 77 +#define R_PPC_DTPREL32 78 +#define R_PPC_GOT_TLSGD16 79 +#define R_PPC_GOT_TLSGD16_LO 80 +#define R_PPC_GOT_TLSGD16_HI 81 +#define R_PPC_GOT_TLSGD16_HA 82 +#define R_PPC_GOT_TLSLD16 83 +#define R_PPC_GOT_TLSLD16_LO 84 +#define R_PPC_GOT_TLSLD16_HI 85 +#define R_PPC_GOT_TLSLD16_HA 86 +#define R_PPC_GOT_TPREL16 87 +#define R_PPC_GOT_TPREL16_LO 88 +#define R_PPC_GOT_TPREL16_HI 89 +#define R_PPC_GOT_TPREL16_HA 90 /* * The remaining relocs are from the Embedded ELF ABI, and are not in the From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 02:08:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3CBB106564A; Thu, 1 Jan 2009 02:08:56 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1BF98FC12; Thu, 1 Jan 2009 02:08:56 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0128uZE041173; Thu, 1 Jan 2009 02:08:56 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0128ugu041171; Thu, 1 Jan 2009 02:08:56 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901010208.n0128ugu041171@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 1 Jan 2009 02:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186667 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 02:08:57 -0000 Author: obrien Date: Thu Jan 1 02:08:56 2009 New Revision: 186667 URL: http://svn.freebsd.org/changeset/base/186667 Log: style(9) Verified with: svn diff -x -Bbw elf_generic.h elf64.h Modified: head/sys/sys/elf64.h head/sys/sys/elf_generic.h Modified: head/sys/sys/elf64.h ============================================================================== --- head/sys/sys/elf64.h Thu Jan 1 02:07:32 2009 (r186666) +++ head/sys/sys/elf64.h Thu Jan 1 02:08:56 2009 (r186667) @@ -141,16 +141,16 @@ typedef struct { } Elf64_Rela; /* Macros for accessing the fields of r_info. */ -#define ELF64_R_SYM(info) ((info) >> 32) -#define ELF64_R_TYPE(info) ((info) & 0xffffffffL) +#define ELF64_R_SYM(info) ((info) >> 32) +#define ELF64_R_TYPE(info) ((info) & 0xffffffffL) /* Macro for constructing r_info from field values. */ -#define ELF64_R_INFO(sym, type) (((sym) << 32) + ((type) & 0xffffffffL)) +#define ELF64_R_INFO(sym, type) (((sym) << 32) + ((type) & 0xffffffffL)) #define ELF64_R_TYPE_DATA(info) (((Elf64_Xword)(info)<<32)>>40) #define ELF64_R_TYPE_ID(info) (((Elf64_Xword)(info)<<56)>>56) #define ELF64_R_TYPE_INFO(data, type) \ - (((Elf64_Xword)(data)<<8)+(Elf64_Xword)(type)) + (((Elf64_Xword)(data)<<8)+(Elf64_Xword)(type)) /* * Note entry header @@ -197,14 +197,14 @@ typedef struct { } Elf64_Sym; /* Macros for accessing the fields of st_info. */ -#define ELF64_ST_BIND(info) ((info) >> 4) -#define ELF64_ST_TYPE(info) ((info) & 0xf) +#define ELF64_ST_BIND(info) ((info) >> 4) +#define ELF64_ST_TYPE(info) ((info) & 0xf) /* Macro for constructing st_info from field values. */ -#define ELF64_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) +#define ELF64_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) /* Macro for accessing the fields of st_other. */ -#define ELF64_ST_VISIBILITY(oth) ((oth) & 0x3) +#define ELF64_ST_VISIBILITY(oth) ((oth) & 0x3) /* Structures used by Sun & GNU-style symbol versioning. */ typedef struct { Modified: head/sys/sys/elf_generic.h ============================================================================== --- head/sys/sys/elf_generic.h Thu Jan 1 02:07:32 2009 (r186666) +++ head/sys/sys/elf_generic.h Thu Jan 1 02:08:56 2009 (r186667) @@ -27,7 +27,7 @@ */ #ifndef _SYS_ELF_GENERIC_H_ -#define _SYS_ELF_GENERIC_H_ 1 +#define _SYS_ELF_GENERIC_H_ 1 #include @@ -40,20 +40,20 @@ #error "__ELF_WORD_SIZE must be defined as 32 or 64" #endif -#define ELF_CLASS __CONCAT(ELFCLASS,__ELF_WORD_SIZE) +#define ELF_CLASS __CONCAT(ELFCLASS,__ELF_WORD_SIZE) #if BYTE_ORDER == LITTLE_ENDIAN -#define ELF_DATA ELFDATA2LSB +#define ELF_DATA ELFDATA2LSB #elif BYTE_ORDER == BIG_ENDIAN -#define ELF_DATA ELFDATA2MSB +#define ELF_DATA ELFDATA2MSB #else #error "Unknown byte order" #endif -#define __elfN(x) __CONCAT(__CONCAT(__CONCAT(elf,__ELF_WORD_SIZE),_),x) -#define __ElfN(x) __CONCAT(__CONCAT(__CONCAT(Elf,__ELF_WORD_SIZE),_),x) -#define __ELFN(x) __CONCAT(__CONCAT(__CONCAT(ELF,__ELF_WORD_SIZE),_),x) -#define __ElfType(x) typedef __ElfN(x) __CONCAT(Elf_,x) +#define __elfN(x) __CONCAT(__CONCAT(__CONCAT(elf,__ELF_WORD_SIZE),_),x) +#define __ElfN(x) __CONCAT(__CONCAT(__CONCAT(Elf,__ELF_WORD_SIZE),_),x) +#define __ELFN(x) __CONCAT(__CONCAT(__CONCAT(ELF,__ELF_WORD_SIZE),_),x) +#define __ElfType(x) typedef __ElfN(x) __CONCAT(Elf_,x) __ElfType(Addr); __ElfType(Half); @@ -78,11 +78,11 @@ __ElfType(Hashelt); __ElfType(Size); __ElfType(Ssize); -#define ELF_R_SYM __ELFN(R_SYM) -#define ELF_R_TYPE __ELFN(R_TYPE) -#define ELF_R_INFO __ELFN(R_INFO) -#define ELF_ST_BIND __ELFN(ST_BIND) -#define ELF_ST_TYPE __ELFN(ST_TYPE) -#define ELF_ST_INFO __ELFN(ST_INFO) +#define ELF_R_SYM __ELFN(R_SYM) +#define ELF_R_TYPE __ELFN(R_TYPE) +#define ELF_R_INFO __ELFN(R_INFO) +#define ELF_ST_BIND __ELFN(ST_BIND) +#define ELF_ST_TYPE __ELFN(ST_TYPE) +#define ELF_ST_INFO __ELFN(ST_INFO) #endif /* !_SYS_ELF_GENERIC_H_ */ From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 02:11:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84E1A106566C; Thu, 1 Jan 2009 02:11:01 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7284E8FC0C; Thu, 1 Jan 2009 02:11:01 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n012B19k041271; Thu, 1 Jan 2009 02:11:01 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n012B1YQ041269; Thu, 1 Jan 2009 02:11:01 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901010211.n012B1YQ041269@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 1 Jan 2009 02:11:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186668 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 02:11:02 -0000 Author: obrien Date: Thu Jan 1 02:11:01 2009 New Revision: 186668 URL: http://svn.freebsd.org/changeset/base/186668 Log: style(9) Differences from 'svn diff -x -Bbw' are trivially verifiable as only style(9). Modified: head/sys/sys/imgact_elf.h head/sys/sys/link_elf.h Modified: head/sys/sys/imgact_elf.h ============================================================================== --- head/sys/sys/imgact_elf.h Thu Jan 1 02:08:56 2009 (r186667) +++ head/sys/sys/imgact_elf.h Thu Jan 1 02:11:01 2009 (r186668) @@ -29,13 +29,13 @@ */ #ifndef _SYS_IMGACT_ELF_H_ -#define _SYS_IMGACT_ELF_H_ +#define _SYS_IMGACT_ELF_H_ #include #ifdef _KERNEL -#define AUXARGS_ENTRY(pos, id, val) {suword(pos++, id); suword(pos++, val);} +#define AUXARGS_ENTRY(pos, id, val) {suword(pos++, id); suword(pos++, val);} struct thread; @@ -62,14 +62,14 @@ typedef struct { const char *interp_path; struct sysentvec *sysvec; const char *interp_newpath; - int flags; -#define BI_CAN_EXEC_DYN 0x0001 + int flags; +#define BI_CAN_EXEC_DYN 0x0001 } __ElfN(Brandinfo); __ElfType(Auxargs); __ElfType(Brandinfo); -#define MAX_BRANDS 8 +#define MAX_BRANDS 8 int __elfN(brand_inuse)(Elf_Brandinfo *entry); int __elfN(insert_brand_entry)(Elf_Brandinfo *entry); @@ -80,7 +80,7 @@ int __elfN(coredump)(struct thread *, st /* Machine specific function to dump per-thread information. */ void __elfN(dump_thread)(struct thread *, void *, size_t *); -extern int __elfN(fallback_brand); +int __elfN(fallback_brand); #endif /* _KERNEL */ Modified: head/sys/sys/link_elf.h ============================================================================== --- head/sys/sys/link_elf.h Thu Jan 1 02:08:56 2009 (r186667) +++ head/sys/sys/link_elf.h Thu Jan 1 02:11:01 2009 (r186668) @@ -39,7 +39,7 @@ */ #ifndef _SYS_LINK_ELF_H_ -#define _SYS_LINK_ELF_H_ +#define _SYS_LINK_ELF_H_ #include @@ -70,9 +70,9 @@ struct r_debug { void (*r_brk)(struct r_debug *, struct link_map *); /* pointer to break point */ enum { - RT_CONSISTENT, /* things are stable */ - RT_ADD, /* adding a shared library */ - RT_DELETE /* removing a shared library */ + RT_CONSISTENT, /* things are stable */ + RT_ADD, /* adding a shared library */ + RT_DELETE /* removing a shared library */ } r_state; }; @@ -90,8 +90,7 @@ struct dl_phdr_info __BEGIN_DECLS -typedef int (*__dl_iterate_hdr_callback)(struct dl_phdr_info *, size_t, - void *); +typedef int (*__dl_iterate_hdr_callback)(struct dl_phdr_info *, size_t, void *); extern int dl_iterate_phdr(__dl_iterate_hdr_callback, void *); __END_DECLS From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 02:29:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C7C1106566B; Thu, 1 Jan 2009 02:29:18 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2AB8B8FC08; Thu, 1 Jan 2009 02:29:18 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n012TI4l041682; Thu, 1 Jan 2009 02:29:18 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n012TIh1041681; Thu, 1 Jan 2009 02:29:18 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901010229.n012TIh1041681@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 1 Jan 2009 02:29:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186669 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 02:29:18 -0000 Author: obrien Date: Thu Jan 1 02:29:17 2009 New Revision: 186669 URL: http://svn.freebsd.org/changeset/base/186669 Log: style(9) Verfied with: svn diff -x -Bbw file.h showing empty diff Modified: head/sys/sys/file.h Modified: head/sys/sys/file.h ============================================================================== --- head/sys/sys/file.h Thu Jan 1 02:11:01 2009 (r186668) +++ head/sys/sys/file.h Thu Jan 1 02:29:17 2009 (r186669) @@ -119,7 +119,7 @@ struct file { struct ucred *f_cred; /* associated credentials. */ struct vnode *f_vnode; /* NULL or applicable vnode */ short f_type; /* descriptor type */ - short f_vnread_flags; /* (f) Sleep lock for f_offset */ + short f_vnread_flags; /* (f) Sleep lock for f_offset */ volatile u_int f_flag; /* see fcntl.h */ volatile u_int f_count; /* reference count */ /* From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 02:29:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FE9F1065670; Thu, 1 Jan 2009 02:29:57 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E0AD8FC25; Thu, 1 Jan 2009 02:29:57 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n012TvkJ041729; Thu, 1 Jan 2009 02:29:57 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n012TvPk041728; Thu, 1 Jan 2009 02:29:57 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200901010229.n012TvPk041728@svn.freebsd.org> From: Tim Kientzle Date: Thu, 1 Jan 2009 02:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186670 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 02:29:58 -0000 Author: kientzle Date: Thu Jan 1 02:29:57 2009 New Revision: 186670 URL: http://svn.freebsd.org/changeset/base/186670 Log: Don't try to read the next Gzip header after we reach the end of the compressed stream. This is desirable behavior, but the implementation here is very broken and causes strange problems, so disable it for now. Thanks to Simon L. Nielsen for reporting this problem. Modified: head/lib/libarchive/archive_read_support_compression_gzip.c Modified: head/lib/libarchive/archive_read_support_compression_gzip.c ============================================================================== --- head/lib/libarchive/archive_read_support_compression_gzip.c Thu Jan 1 02:29:17 2009 (r186669) +++ head/lib/libarchive/archive_read_support_compression_gzip.c Thu Jan 1 02:29:57 2009 (r186670) @@ -428,8 +428,9 @@ gzip_source_read(struct archive_read_sou "Failed to clean up gzip decompressor"); return (ARCHIVE_FATAL); } - /* Restart header parser with the next block. */ - state->header_state = state->header_done = 0; + /* zlib has been torn down */ + state->header_done = 0; + state->eof = 1; /* FALL THROUGH */ case Z_OK: /* Decompressor made some progress. */ /* If we filled our buffer, update stats and return. */ From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 07:08:09 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47569106564A; Thu, 1 Jan 2009 07:08:09 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 05BBD8FC13; Thu, 1 Jan 2009 07:08:08 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n0176Tq4028568; Thu, 1 Jan 2009 00:06:30 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 01 Jan 2009 00:06:43 -0700 (MST) Message-Id: <20090101.000643.1543764949.imp@bsdimp.com> To: rik@inse.ru From: "M. Warner Losh" In-Reply-To: <495B406F.2040305@localhost.inse.ru> References: <200812271522.mBRFMMHY074982@svn.freebsd.org> <20081229.114241.756909212.imp@bsdimp.com> <495B406F.2040305@localhost.inse.ru> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: rik@FreeBSD.org, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186520 - head/sys/dev/puc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 07:08:09 -0000 In message: <495B406F.2040305@localhost.inse.ru> Roman Kurakin writes: : M. Warner Losh wrote: : > In message: <200812271522.mBRFMMHY074982@svn.freebsd.org> : > Roman Kurakin writes: : > : Author: rik : > : Date: Sat Dec 27 15:22:22 2008 : > : New Revision: 186520 : > : URL: http://svn.freebsd.org/changeset/base/186520 : > : : > : Log: : > : Add support for the Oxford OX16PCI958-based card. : > : : > : Note, that the patch provided with this card for the Linux states that : > : the card uses DEFAULT_RCLK * 2, while in fact it is '* 10'. So probably : > : we should also use the subdevice/subvendord here. For now just ignore : > : that fact. : > : > I've had problems with doing that on some Oxford based cards. The : > vendor that uses them doesn't set them up, so you can't tell my : > cardbus oxford card from the pcie oxford card that someone else sent : > me patches for: both with different clock multipliers... : > : Probably we need to implement AUTODETECT_RCLK. I've had the patch, : but it worked only for modules, cause there was no working timers while the : cards probe time if the driver was compiled in. I've planned to move : detection : code to the first open and do some cleanup after the detection, but : didn't do : that. I'd like to see that. I think we can defer the detection of RCLK to later. How accurate is this, btw? How dependent on timing of interrupts is it? Warner From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 10:55:27 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33E601065672; Thu, 1 Jan 2009 10:55:27 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 227308FC12; Thu, 1 Jan 2009 10:55:27 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n01AtQVf052764; Thu, 1 Jan 2009 10:55:26 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n01AtQaN052763; Thu, 1 Jan 2009 10:55:26 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901011055.n01AtQaN052763@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Jan 2009 10:55:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186677 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 10:55:27 -0000 Author: dougb Date: Thu Jan 1 10:55:26 2009 New Revision: 186677 URL: http://svn.freebsd.org/changeset/base/186677 Log: Revert 184781, 184804, and 184832 (automatic installation of files that differ only by VCS Id) for the following reasons: 1. It was added without my consent, review, or even a heads up 2. It is something that I've repeatedly said I do not want, and certainly do not want as the default 3. It is poorly implemented (much too complex, produces false positives e.g., /etc/mail/helpfile) Given that this is a situation that comes up very infrequently (usually only for a major version upgrade) and can usually be handled simply enough on a one-off basis, I will once again point out that I think this is a Bad Idea. I would be willing to consider a better implementation as an option that is off by default. Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Thu Jan 1 06:43:16 2009 (r186676) +++ head/usr.sbin/mergemaster/mergemaster.sh Thu Jan 1 10:55:26 2009 (r186677) @@ -947,25 +947,6 @@ for COMPFILE in `find . -type f -size +0 echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting" rm "${COMPFILE}" ;; - - *) - tempfoo=`basename $0` - TMPFILE1=`mktemp -t ${tempfoo}` || break - TMPFILE2=`mktemp -t ${tempfoo}` || break - sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${DESTDIR}${COMPFILE#.}" > "${TMPFILE1}" - sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${COMPFILE}" > "${TMPFILE2}" - if diff -q ${DIFF_OPTIONS} "${TMPFILE1}" "${TMPFILE2}" > \ - /dev/null 2>&1; then - echo " *** Temp ${COMPFILE} and installed are the same except CVS Id, replacing" - if mm_install "${COMPFILE}"; then - echo " *** ${COMPFILE} upgraded successfully" - echo '' - else - echo " *** Problem upgrading ${COMPFILE}, it will remain to merge by hand" - fi - fi - rm -f "${TMPFILE1}" "${TMPFILE2}" - ;; esac ;; esac From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 11:35:15 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6FFF91065673 for ; Thu, 1 Jan 2009 11:35:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 20A708FC12 for ; Thu, 1 Jan 2009 11:35:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 18692 invoked by uid 399); 1 Jan 2009 11:08:34 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 1 Jan 2009 11:08:34 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <495CA430.5060900@FreeBSD.org> Date: Thu, 01 Jan 2009 03:08:32 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.18 (X11/20081128) MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <200901011055.n01AtQaN052763@svn.freebsd.org> In-Reply-To: <200901011055.n01AtQaN052763@svn.freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r186677 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 11:35:15 -0000 I neglected to mention that there is already the -U option that will handle this situation nicely (as was discussed on -current the last time this came up). Doug Doug Barton wrote: > Author: dougb > Date: Thu Jan 1 10:55:26 2009 > New Revision: 186677 > URL: http://svn.freebsd.org/changeset/base/186677 > > Log: > Revert 184781, 184804, and 184832 (automatic installation of files > that differ only by VCS Id) for the following reasons: > 1. It was added without my consent, review, or even a heads up > 2. It is something that I've repeatedly said I do not want, and certainly > do not want as the default > 3. It is poorly implemented (much too complex, produces false positives > e.g., /etc/mail/helpfile) > > Given that this is a situation that comes up very infrequently (usually > only for a major version upgrade) and can usually be handled simply > enough on a one-off basis, I will once again point out that I think > this is a Bad Idea. I would be willing to consider a better implementation > as an option that is off by default. > > Modified: > head/usr.sbin/mergemaster/mergemaster.sh > > Modified: head/usr.sbin/mergemaster/mergemaster.sh > ============================================================================== > --- head/usr.sbin/mergemaster/mergemaster.sh Thu Jan 1 06:43:16 2009 (r186676) > +++ head/usr.sbin/mergemaster/mergemaster.sh Thu Jan 1 10:55:26 2009 (r186677) > @@ -947,25 +947,6 @@ for COMPFILE in `find . -type f -size +0 > echo " *** Temp ${COMPFILE} and installed have the same CVS Id, deleting" > rm "${COMPFILE}" > ;; > - > - *) > - tempfoo=`basename $0` > - TMPFILE1=`mktemp -t ${tempfoo}` || break > - TMPFILE2=`mktemp -t ${tempfoo}` || break > - sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${DESTDIR}${COMPFILE#.}" > "${TMPFILE1}" > - sed "s/[$]${CVS_ID_TAG}:.*[$]//g" "${COMPFILE}" > "${TMPFILE2}" > - if diff -q ${DIFF_OPTIONS} "${TMPFILE1}" "${TMPFILE2}" > \ > - /dev/null 2>&1; then > - echo " *** Temp ${COMPFILE} and installed are the same except CVS Id, replacing" > - if mm_install "${COMPFILE}"; then > - echo " *** ${COMPFILE} upgraded successfully" > - echo '' > - else > - echo " *** Problem upgrading ${COMPFILE}, it will remain to merge by hand" > - fi > - fi > - rm -f "${TMPFILE1}" "${TMPFILE2}" > - ;; > esac > ;; > esac > From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 11:41:14 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0025C106564A; Thu, 1 Jan 2009 11:41:13 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E2D908FC08; Thu, 1 Jan 2009 11:41:13 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n01BfDoL054334; Thu, 1 Jan 2009 11:41:13 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n01BfDqj054333; Thu, 1 Jan 2009 11:41:13 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901011141.n01BfDqj054333@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Jan 2009 11:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 11:41:14 -0000 Author: dougb Date: Thu Jan 1 11:41:13 2009 New Revision: 186678 URL: http://svn.freebsd.org/changeset/base/186678 Log: Maintenance and updates ======================= 1. Various improvements to the mtree (-U) feature: a. Seperate the notion of directory and file (user can override db path) b. Only check for the existence of the mtree file if -U is set c. Use mktemp to create the new version of the file d. More safely install the new file e. Standardize error messages a bit 2. Remove the last of the MAKEDEV stuff (RIP) New Features ============ 1. Switch to using the top level (e.g., /usr/src) Makefile, and specify that we should use the *.mk files from the source directory instead of the installed versions. [1][2] This allows easier cross builds and simplifies (or in some cases permits) upgrading. 2. Check for the deprecated 'nodev' option in /etc/fstab [3] 3. Add support for the IGNORE_FILES variable [4] and deprecate IGNORE_MOTD accordingly. 4. Before installing a file check to make sure that the target does not already exist as a directory [5] 5. Check to be sure that the file installed and error out if not PR: bin/96528 [1] Submitted by: ru [1] PR: bin/129639 [2] Submitted by: sam [2] PR: bin/122282 [3] Submitted by: Eygene Ryabinkin [3] PR: bin/106642 [4] Submitted by: Henrik Brix Andersen [4] PR: bin/108183 [5] Submitted by: Riccardo Torrini [5] Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Thu Jan 1 10:55:26 2009 (r186677) +++ head/usr.sbin/mergemaster/mergemaster.sh Thu Jan 1 11:41:13 2009 (r186678) @@ -5,7 +5,7 @@ # Compare files created by /usr/src/etc/Makefile (or the directory # the user specifies) with the currently installed copies. -# Copyright 1998-2004 Douglas Barton +# Copyright 1998-2009 Douglas Barton # DougB@FreeBSD.org # $FreeBSD$ @@ -244,10 +244,6 @@ press_to_continue () { # TEMPROOT='/var/tmp/temproot' -# Assign the location of the mtree database -# -MTREEDB='/var/db/mergemaster.mtree' - # Read /etc/mergemaster.rc first so the one in $HOME can override # if [ -r /etc/mergemaster.rc ]; then @@ -260,12 +256,17 @@ if [ -r "$HOME/.mergemasterrc" ]; then . "$HOME/.mergemasterrc" fi +# Assign the location of the mtree database +# +MTREEDB=${MTREEDB:-/var/db} +MTREEFILE="${MTREEDB}/mergemaster.mtree" + # Check the command line options # while getopts ":ascrvhipCPm:t:du:w:D:A:U" COMMAND_LINE_ARGUMENT ; do case "${COMMAND_LINE_ARGUMENT}" in A) - ARCHSTRING='MACHINE_ARCH='${OPTARG} + ARCHSTRING='TARGET_ARCH='${OPTARG} ;; U) AUTO_UPGRADE=yes @@ -338,10 +339,28 @@ if [ -n "${PRESERVE_FILES}" -a -z "${PRE PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` fi -# Check the for the mtree database in DESTDIR. -if [ ! -f ${DESTDIR}${MTREEDB} ]; then - echo "*** Unable to find mtree database. Skipping auto-upgrade." - unset AUTO_UPGRADE +# Check for the mtree database in DESTDIR +case "${AUTO_UPGRADE}" in +'') ;; # If the option is not set no need to run the test or warn the user +*) + if [ ! -f "${DESTDIR}${MTREEFILE}" ]; then + echo '' + echo "*** Unable to find mtree database. Skipping auto-upgrade." + echo '' + press_to_continue + unset AUTO_UPGRADE + fi + ;; +esac + +if grep -q nodev ${DESTDIR}/etc/fstab; then + echo '' + echo "*** You have the deprecated 'nodev' option in ${DESTDIR}/etc/fstab." + echo " This can prevent your system from mounting the filesystem on reboot." + echo " Please update your fstab before continuing." + echo " See fstab(5) for more information." + echo '' + exit 1 fi echo '' @@ -412,14 +431,25 @@ DIFF_FLAG=${DIFF_FLAG:--u} # Assign the source directory # -SOURCEDIR=${SOURCEDIR:-/usr/src/etc} +SOURCEDIR=${SOURCEDIR:-/usr/src} +if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a \ + -f ${SOURCEDIR}/../Makefile.inc1 ]; then + echo " *** The source directory you specified (${SOURCEDIR})" + echo " will be reset to ${SOURCEDIR}/.." + echo '' + sleep 3 + SOURCEDIR=${SOURCEDIR}/.. +fi + +# Setup make to use system files from SOURCEDIR +MM_MAKE="make -m ${SOURCEDIR}/share/mk" # Check DESTDIR against the mergemaster mtree database to see what # files the user changed from the reference files. # CHANGED= -if [ -n "${AUTO_UPGRADE}" -a -f "${DESTDIR}${MTREEDB}" ]; then - for file in `mtree -eq -f ${DESTDIR}${MTREEDB} -p ${DESTDIR}/ \ +if [ -n "${AUTO_UPGRADE}" -a -f "${DESTDIR}${MTREEFILE}" ]; then + for file in `mtree -eq -f ${DESTDIR}${MTREEFILE} -p ${DESTDIR}/ \ 2>/dev/null | awk '($2 == "changed") {print $1}'`; do if [ -f "${DESTDIR}/$file" ]; then CHANGED="${CHANGED} ${DESTDIR}/$file" @@ -552,13 +582,13 @@ case "${RERUN}" in case "${DESTDIR}" in '') ;; *) - make DESTDIR=${DESTDIR} ${ARCHSTRING} distrib-dirs + ${MM_MAKE} DESTDIR=${DESTDIR} ${ARCHSTRING} distrib-dirs ;; esac - make DESTDIR=${TEMPROOT} ${ARCHSTRING} distrib-dirs && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} obj && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} all && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj make ${ARCHSTRING} \ + ${MM_MAKE} DESTDIR=${TEMPROOT} ${ARCHSTRING} distrib-dirs && + MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} ${ARCHSTRING} obj SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} ${ARCHSTRING} all SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} ${ARCHSTRING} \ DESTDIR=${TEMPROOT} distribution;} || { echo ''; echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; @@ -569,8 +599,8 @@ case "${RERUN}" in *) # Only set up files that are crucial to {build|install}world { mkdir -p ${TEMPROOT}/etc && - cp -p ${SOURCEDIR}/master.passwd ${TEMPROOT}/etc && - cp -p ${SOURCEDIR}/group ${TEMPROOT}/etc;} || + cp -p ${SOURCEDIR}/etc/master.passwd ${TEMPROOT}/etc && + cp -p ${SOURCEDIR}/etc/group ${TEMPROOT}/etc;} || { echo ''; echo ' *** FATAL ERROR: Cannot copy files to the temproot environment'; echo ''; @@ -599,17 +629,23 @@ case "${RERUN}" in esac # Avoid comparing the motd if the user specifies it in .mergemasterrc + # Compatibility shim to be removed in FreeBSD 9.x case "${IGNORE_MOTD}" in '') ;; - *) rm -f ${TEMPROOT}/etc/motd + *) IGNORE_FILES="${IGNORE_FILES} /etc/motd" + echo '' + echo "*** You have the IGNORE_MOTD option set in your mergemaster rc file." + echo " This option is deprecated in favor of the IGNORE_FILES option." + echo " Please update your rc file accordingly." + echo '' + press_to_continue ;; esac - # Avoid trying to update MAKEDEV if /dev is on a devfs - if /sbin/sysctl vfs.devfs.generation > /dev/null 2>&1 ; then - rm -f ${TEMPROOT}/dev/MAKEDEV ${TEMPROOT}/dev/MAKEDEV.local - fi - + # Avoid comparing the following user specified files + for file in ${IGNORE_FILES}; do + test -e ${file} && unlink ${file} + done ;; # End of the "RERUN" test esac @@ -626,9 +662,9 @@ find ${TEMPROOT}/usr/obj -type f -delete find ${TEMPROOT} -type f -size 0 -delete 2>/dev/null # Build the mtree database in a temporary location. -# TODO: Possibly use mktemp instead for security reasons? +MTREENEW=`mktemp -t mergemaster.mtree` case "${PRE_WORLD}" in -'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${DESTDIR}${MTREEDB}.new 2>/dev/null +'') mtree -ci -p ${TEMPROOT} -k size,md5digest > ${DESTDIR}${MTREENEW} 2>/dev/null ;; *) # We don't want to mess with the mtree database on a pre-world run. ;; @@ -647,7 +683,7 @@ if [ -z "${NEW_UMASK}" -a -z "${AUTO_RUN echo '' echo " *** Your umask is currently set to ${USER_UMASK}. By default, this script" echo " installs all files with the same user, group and modes that" - echo " they are created with by ${SOURCEDIR}/Makefile, compared to" + echo " they are created with by ${SOURCEDIR}/etc/Makefile, compared to" echo " a umask of 022. This umask allows world read permission when" echo " the file's default permissions have it." echo '' @@ -714,6 +750,12 @@ esac # Use the umask/mode information to install the files # Create directories as needed # +install_error () { + echo "*** FATAL ERROR: Unable to install ${1} to ${2}" + echo '' + exit 1 +} + do_install_and_rm () { case "${PRESERVE_FILES}" in [Yy][Ee][Ss]) @@ -724,8 +766,15 @@ do_install_and_rm () { ;; esac - install -m "${1}" "${2}" "${3}" && - rm -f "${2}" + if [ ! -d "${3}/${2##*/}" ]; then + if install -m ${1} ${2} ${3}; then + unlink ${2} + else + install_error ${2} ${3} + fi + else + install_error ${2} ${3} + fi } # 4095 = "obase=10;ibase=8;07777" | bc @@ -828,11 +877,6 @@ mm_install () { ;; esac else # File matched -x - case "${1#.}" in - /dev/MAKEDEV) - NEED_MAKEDEV=yes - ;; - esac do_install_and_rm "${FILE_MODE}" "${1}" "${DESTDIR}${INSTALL_DIR}" fi return $? @@ -904,7 +948,7 @@ if [ -r "${MM_PRE_COMPARE_SCRIPT}" ]; th fi # Using -size +0 avoids uselessly checking the empty log files created -# by ${SOURCEDIR}/Makefile and the device entries in ./dev, but does +# by ${SOURCEDIR}/etc/Makefile and the device entries in ./dev, but does # check the scripts in ./dev, as we'd like (assuming no devfs of course). # for COMPFILE in `find . -type f -size +0`; do @@ -986,9 +1030,10 @@ done # This is for the do way up there a echo '' echo "*** Comparison complete" -if [ -f "${DESTDIR}${MTREEDB}.new" ]; then +if [ -f "${DESTDIR}${MTREENEW}" ]; then echo "*** Saving mtree database for future upgrades" - mv -f ${DESTDIR}${MTREEDB}.new ${DESTDIR}${MTREEDB} 2>/dev/null + test -e "${MTREEFILE}" && unlink ${MTREEFILE} + mv ${DESTDIR}${MTREENEW} ${DESTDIR}${MTREEFILE} fi echo '' @@ -1096,16 +1141,6 @@ run_it_now () { esac } -case "${NEED_MAKEDEV}" in -'') ;; -*) - echo '' - echo "*** You installed a new ${DESTDIR}/dev/MAKEDEV script, so make sure that you run" - echo " 'cd ${DESTDIR}/dev && /bin/sh MAKEDEV all' to rebuild your devices" - run_it_now "cd ${DESTDIR}/dev && /bin/sh MAKEDEV all" - ;; -esac - case "${NEED_NEWALIASES}" in '') ;; *) @@ -1187,7 +1222,7 @@ esac case "${PRE_WORLD}" in '') ;; *) - MAKE_CONF="${SOURCEDIR%etc}share/examples/etc/make.conf" + MAKE_CONF="${SOURCEDIR}/share/examples/etc/make.conf" (echo '' echo '*** Comparing make variables' From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 12:09:57 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDF2F106564A; Thu, 1 Jan 2009 12:09:57 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC8908FC18; Thu, 1 Jan 2009 12:09:57 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n01C9vEf058532; Thu, 1 Jan 2009 12:09:57 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n01C9vu0058531; Thu, 1 Jan 2009 12:09:57 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901011209.n01C9vu0058531@svn.freebsd.org> From: Doug Barton Date: Thu, 1 Jan 2009 12:09:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186679 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 12:09:58 -0000 Author: dougb Date: Thu Jan 1 12:09:57 2009 New Revision: 186679 URL: http://svn.freebsd.org/changeset/base/186679 Log: General Improvements ==================== 1. List the command line options in a more standard way 2. Improve the explanations of some of the arguments (-A, -D) 3. Add ARCHSTRING and MTREEDB to the example rc file 4. Re-sort some of the examples according to the existing distinction of "has a command line version" vs. "does not have a command line version" Document changes for r186678 =========================== 1. /usr/src/etc -> /usr/src where needed [1] 2. Add IGNORE_FILES to the example rc [2] (and remove IGNORE_MOTD) 3. Update the EXIT STATUS section for [3] and [4] Update Copyright and .Dd accordingly PR: bin/96528 [1] Submitted by: ru [1] PR: bin/106642 [2] Submitted by: Henrik Brix Andersen PR: bin/122282 [3] Submitted by: Eygene Ryabinkin [3] PR: bin/108183 [4] Submitted by: Riccardo Torrini [4] Modified: head/usr.sbin/mergemaster/mergemaster.8 Modified: head/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.8 Thu Jan 1 11:41:13 2009 (r186678) +++ head/usr.sbin/mergemaster/mergemaster.8 Thu Jan 1 12:09:57 2009 (r186679) @@ -1,4 +1,4 @@ -.\" Copyright (c) 1998-2003 Douglas Barton +.\" Copyright (c) 1998-2009 Douglas Barton .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 4, 2006 +.Dd January 1, 2009 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -32,14 +32,14 @@ .Nd merge configuration files, et al during an upgrade .Sh SYNOPSIS .Nm -.Op Fl scrvahipCPU +.Op Fl achiprsvCPU +.Op Fl A Ar Target architecture +.Op Fl D Ar /destdir/path .Op Fl m Ar /path/to/sources .Op Fl t Ar /path/to/temp/root .Op Fl d .Op Fl u Ar N .Op Fl w Ar N -.Op Fl A Ar architecture -.Op Fl D Ar /path .Sh DESCRIPTION The .Nm @@ -54,7 +54,7 @@ recommended that you back up your directory before beginning this process. .Pp The script uses -.Pa /usr/src/etc/Makefile +.Pa /usr/src/Makefile to build a temporary root environment from .Pa / down, populating that environment with the various @@ -236,7 +236,7 @@ Supply an alternate screen width to the .Xr sdiff 1 command in numbers of columns. The default is 80. -.It Fl A Ar architecture +.It Fl A Ar Target architecture Specify an alternative .Ev TARGET_ARCH architecture name. @@ -294,18 +294,24 @@ with all values commented out: # These are options for mergemaster, with their default values listed # The following options have command line overrides # +# The target architecture (unset by default) +#ARCHSTRING='TARGET_ARCH=' +# +# Sourcedir is the directory to do the 'make' in (where the new files are) +#SOURCEDIR='/usr/src' +# # Directory to install the temporary root environment into #TEMPROOT='/var/tmp/temproot' # +# Specify the destination directory for the installed files +#DESTDIR= +# # Strict comparison bypasses the CVS $Id tests and compares every file #STRICT=no # # Type of diff, such as unified, context, etc. #DIFF_FLAG='-u' # -# Additional options for diff. This will get unset when using -s. -#DIFF_OPTIONS='-I$\&FreeBSD:.*[$]' # Ignores CVS Id tags -# # Verbose mode includes more details and additional checks #VERBOSE= # @@ -322,25 +328,26 @@ with all values commented out: #PRESERVE_FILES=yes #PRESERVE_FILES_DIR=/var/tmp/mergemaster/preserved-files-`date +%y%m%d-%H%M%S` # -# Sourcedir is the directory to do the 'make' in (where the new files are) -#SOURCEDIR='/usr/src/etc' -# # The umask for mergemaster to compare the default file's modes to #NEW_UMASK=022 # -# Specify the destination directory for the installed files -#DESTDIR= -# # The following options have no command line overrides +# +# Files to always avoid comparing +#IGNORE_FILES='/etc/motd /etc/printcap foo bar' +# +# Additional options for diff. This will get unset when using -s. +#DIFF_OPTIONS='-I$\&FreeBSD:.*[$]' # Ignores CVS Id tags +# +# Location to store the list of mtree values for AUTO_UPGRADE purposes +#MTREEDB='/var/db' +# # For those who just cannot stand including the full path to PAGER #DONT_CHECK_PAGER= # # If you set 'yes' above, make sure to include the PATH to your pager #PATH=/bin:/usr/bin:/usr/sbin # -# Don't compare the old and new motd files -#IGNORE_MOTD=yes -# # Specify the path to scripts to run before the comparison starts, # and/or after the script has finished its work #MM_PRE_COMPARE_SCRIPT= @@ -357,6 +364,11 @@ Invalid command line option Failure to create the temporary root environment .Pp Failure to populate the temporary root +.Pp +Presence of the 'nodev' option in +.Pa /etc/fstab +.Pp +Failure to install a file .Sh EXAMPLES Typically all you will need to do is type .Nm From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 12:14:39 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 681C51065676; Thu, 1 Jan 2009 12:14:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57CD38FC1B; Thu, 1 Jan 2009 12:14:39 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n01CEdPf059276; Thu, 1 Jan 2009 12:14:39 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n01CEdv3059275; Thu, 1 Jan 2009 12:14:39 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200901011214.n01CEdv3059275@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 1 Jan 2009 12:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186680 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 12:14:40 -0000 Author: bz Date: Thu Jan 1 12:14:39 2009 New Revision: 186680 URL: http://svn.freebsd.org/changeset/base/186680 Log: Back out a non-style(9) change from r186668 to unbreak the kernels. Modified: head/sys/sys/imgact_elf.h Modified: head/sys/sys/imgact_elf.h ============================================================================== --- head/sys/sys/imgact_elf.h Thu Jan 1 12:09:57 2009 (r186679) +++ head/sys/sys/imgact_elf.h Thu Jan 1 12:14:39 2009 (r186680) @@ -80,7 +80,7 @@ int __elfN(coredump)(struct thread *, st /* Machine specific function to dump per-thread information. */ void __elfN(dump_thread)(struct thread *, void *, size_t *); -int __elfN(fallback_brand); +extern int __elfN(fallback_brand); #endif /* _KERNEL */ From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 12:29:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12802106566B; Thu, 1 Jan 2009 12:29:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id A012C8FC17; Thu, 1 Jan 2009 12:29:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-173-239.carlnfd1.nsw.optusnet.com.au (c211-30-173-239.carlnfd1.nsw.optusnet.com.au [211.30.173.239]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n01CThTP028853 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Jan 2009 23:29:44 +1100 Date: Thu, 1 Jan 2009 23:29:42 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "M. Warner Losh" In-Reply-To: <20090101.000643.1543764949.imp@bsdimp.com> Message-ID: <20090101222434.S7598@delplex.bde.org> References: <200812271522.mBRFMMHY074982@svn.freebsd.org> <20081229.114241.756909212.imp@bsdimp.com> <495B406F.2040305@localhost.inse.ru> <20090101.000643.1543764949.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: rik@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, rik@inse.ru, src-committers@freebsd.org Subject: Re: svn commit: r186520 - head/sys/dev/puc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 12:29:58 -0000 On Thu, 1 Jan 2009, M. Warner Losh wrote: > In message: <495B406F.2040305@localhost.inse.ru> > Roman Kurakin writes: > : Probably we need to implement AUTODETECT_RCLK. I've had the patch, > : but it worked only for modules, cause there was no working timers while the > : cards probe time if the driver was compiled in. I've planned to move > : detection > : code to the first open and do some cleanup after the detection, but > : didn't do > : that. > > I'd like to see that. I think we can defer the detection of RCLK to > later. How accurate is this, btw? How dependent on timing of > interrupts is it? This cannot work in the following cases: - serial consoles. The device is then used as a low-level console long before the first open and in a context where timer interrupts are unavailable even if timers are initialized. However, at least on i386's, the main (i8254) timer is initialized just before console initialization (which is just before the first possible use of a console (for booting with -d)), to support the syscons driver using DELAY() which requires the timer to be initialized. DELAY() is probably sufficient for detecting RCLK if it is possible to detect RCLK at all (set the speed low enough so that polling every millisecond after DELAY(1000) is good enough). - emulated hardware. The emulation only needs to emulate the specified speed on the external interface. It would take an unreasonably high quality emulation to get the timing right in all cases, especially for the loopback case which should be used here. In the loopback case, the external interface hardware would not even be used, except part of the unreasonably high quality implementation would involve using the external interface to the extent of telling it to do nothing except return its timing signals so that the looped back input arrives at the same time as it would on the other side of the external interface if it weren't looped back. Bruce From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 13:26:54 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E9C61065687; Thu, 1 Jan 2009 13:26:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88A518FC1F; Thu, 1 Jan 2009 13:26:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n01DQsAb068982; Thu, 1 Jan 2009 13:26:54 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n01DQri0068965; Thu, 1 Jan 2009 13:26:53 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901011326.n01DQri0068965@svn.freebsd.org> From: Ed Schouten Date: Thu, 1 Jan 2009 13:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186681 - in head/sys: conf dev/syscons dev/syscons/teken pc98/cbus X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 13:26:55 -0000 Author: ed Date: Thu Jan 1 13:26:53 2009 New Revision: 186681 URL: http://svn.freebsd.org/changeset/base/186681 Log: Replace syscons terminal renderer by a new renderer that uses libteken. Some time ago I started working on a library called libteken, which is terminal emulator. It does not buffer any screen contents, but only keeps terminal state, such as cursor position, attributes, etc. It should implement all escape sequences that are implemented by the cons25 terminal emulator, but also a fair amount of sequences that are present in VT100 and xterm. A lot of random notes, which could be of interest to users/developers: - Even though I'm leaving the terminal type set to `cons25', users can do experiments with placing `xterm-color' in /etc/ttys. Because we only implement a subset of features of xterm, this may cause artifacts. We should consider extending libteken, because in my opinion xterm is the way to go. Some missing features: - Keypad application mode (DECKPAM) - Character sets (SCS) - libteken is filled with a fair amount of assertions, but unfortunately we cannot go into the debugger anymore if we fail them. I've done development of this library almost entirely in userspace. In sys/dev/syscons/teken there are two applications that can be helpful when debugging the code: - teken_demo: a terminal emulator that can be started from a regular xterm that emulates a terminal using libteken. This application can be very useful to debug any rendering issues. - teken_stress: a stress testing application that emulates random terminal output. libteken has literally survived multiple terabytes of random input. - libteken also includes support for UTF-8, but unfortunately our input layer and font renderer don't support this. If users want to experiment with UTF-8 support, they can enable `TEKEN_UTF8' in teken.h. If you recompile your kernel or the teken_demo application, you can hold some nice experiments. - I've left PC98 the way it is right now. The PC98 platform has a custom syscons renderer, which supports some form of localised input. Maybe we should port PC98 to libteken by the time syscons supports UTF-8? - I've removed the `dumb' terminal emulator. It has been broken for years. It hasn't survived the `struct proc' -> `struct thread' conversion. - To prevent confusion among people that want to hack on libteken: unlike syscons, the state machines that parse the escape sequences are machine generated. This means that if you want to add new escape sequences, you have to add an entry to the `sequences' file. This will cause new entries to be added to `teken_state.h'. - Any rendering artifacts that didn't occur prior to this commit are by accident. They should be reported to me, so I can fix them. Discussed on: current@, hackers@ Discussed with: philip (at 25C3) Added: head/sys/dev/syscons/scterm-teken.c (contents, props changed) head/sys/dev/syscons/teken/ head/sys/dev/syscons/teken/Makefile (contents, props changed) head/sys/dev/syscons/teken/gensequences (contents, props changed) head/sys/dev/syscons/teken/sequences (contents, props changed) head/sys/dev/syscons/teken/teken.c (contents, props changed) head/sys/dev/syscons/teken/teken.h (contents, props changed) head/sys/dev/syscons/teken/teken_demo.c (contents, props changed) head/sys/dev/syscons/teken/teken_stress.c (contents, props changed) head/sys/dev/syscons/teken/teken_subr.h (contents, props changed) head/sys/dev/syscons/teken/teken_subr_compat.h (contents, props changed) head/sys/dev/syscons/teken/teken_wcwidth.h (contents, props changed) head/sys/pc98/cbus/sctermvar.h - copied unchanged from r186677, head/sys/dev/syscons/sctermvar.h Deleted: head/sys/dev/syscons/scterm-dumb.c head/sys/dev/syscons/scterm-sc.c head/sys/dev/syscons/sctermvar.h Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/conf/files.ia64 head/sys/conf/files.powerpc head/sys/conf/files.sparc64 head/sys/dev/syscons/scterm.c head/sys/dev/syscons/syscons.c head/sys/dev/syscons/syscons.h head/sys/pc98/cbus/scterm-sck.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jan 1 12:14:39 2009 (r186680) +++ head/sys/conf/files Thu Jan 1 13:26:53 2009 (r186681) @@ -75,6 +75,11 @@ pccarddevs.h standard \ compile-with "${AWK} -f $S/tools/pccarddevs2h.awk $S/dev/pccard/pccarddevs" \ no-obj no-implicit-rule before-depend \ clean "pccarddevs.h" +teken_state.h optional sc \ + dependency "$S/dev/syscons/teken/gensequences $S/dev/syscons/teken/sequences" \ + compile-with "${AWK} -f $S/dev/syscons/teken/gensequences $S/dev/syscons/teken/sequences > teken_state.h" \ + no-obj no-implicit-rule before-depend \ + clean "teken_state.h" usbdevs.h optional usb \ dependency "$S/tools/usbdevs2h.awk $S/dev/usb/usbdevs" \ compile-with "${AWK} -f $S/tools/usbdevs2h.awk $S/dev/usb/usbdevs -h" \ @@ -1424,7 +1429,6 @@ dev/syscons/logo/logo_saver.c optional l dev/syscons/rain/rain_saver.c optional rain_saver dev/syscons/schistory.c optional sc dev/syscons/scmouse.c optional sc -dev/syscons/scterm-dumb.c optional sc dev/syscons/scterm.c optional sc dev/syscons/scvidctl.c optional sc dev/syscons/snake/snake_saver.c optional snake_saver Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Thu Jan 1 12:14:39 2009 (r186680) +++ head/sys/conf/files.amd64 Thu Jan 1 13:26:53 2009 (r186681) @@ -196,9 +196,10 @@ dev/sio/sio_pci.c optional sio pci dev/sio/sio_puc.c optional sio puc dev/speaker/spkr.c optional speaker dev/syscons/apm/apm_saver.c optional apm_saver apm -dev/syscons/scterm-sc.c optional sc +dev/syscons/scterm-teken.c optional sc dev/syscons/scvgarndr.c optional sc vga dev/syscons/scvtb.c optional sc +dev/syscons/teken/teken.c optional sc dev/uart/uart_cpu_amd64.c optional uart dev/wpi/if_wpi.c optional wpi isa/atrtc.c standard Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Jan 1 12:14:39 2009 (r186680) +++ head/sys/conf/files.i386 Thu Jan 1 13:26:53 2009 (r186681) @@ -220,10 +220,11 @@ dev/sio/sio_puc.c optional sio puc dev/speaker/spkr.c optional speaker dev/sr/if_sr_isa.c optional sr isa dev/syscons/apm/apm_saver.c optional apm_saver apm -dev/syscons/scterm-sc.c optional sc +dev/syscons/scterm-teken.c optional sc dev/syscons/scvesactl.c optional sc vga vesa dev/syscons/scvgarndr.c optional sc vga dev/syscons/scvtb.c optional sc +dev/syscons/teken/teken.c optional sc dev/uart/uart_cpu_i386.c optional uart dev/acpica/acpi_if.m standard dev/wpi/if_wpi.c optional wpi Modified: head/sys/conf/files.ia64 ============================================================================== --- head/sys/conf/files.ia64 Thu Jan 1 12:14:39 2009 (r186680) +++ head/sys/conf/files.ia64 Thu Jan 1 13:26:53 2009 (r186681) @@ -57,9 +57,10 @@ dev/fb/fb.c optional fb | vga dev/fb/vga.c optional vga dev/hwpmc/hwpmc_ia64.c optional hwpmc dev/kbd/kbd.c optional atkbd | sc | ukbd -dev/syscons/scterm-sc.c optional sc +dev/syscons/scterm-teken.c optional sc dev/syscons/scvgarndr.c optional sc vga dev/syscons/scvtb.c optional sc +dev/syscons/teken/teken.c optional sc dev/uart/uart_cpu_ia64.c optional uart dev/acpica/acpi_if.m standard ia64/acpica/OsdEnvironment.c optional acpi Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Thu Jan 1 12:14:39 2009 (r186680) +++ head/sys/conf/files.powerpc Thu Jan 1 13:26:53 2009 (r186681) @@ -39,8 +39,9 @@ dev/powermac_nvram/powermac_nvram.c opti dev/quicc/quicc_bfe_ocp.c optional quicc mpc85xx dev/scc/scc_bfe_macio.c optional scc powermac dev/syscons/scgfbrndr.c optional sc -dev/syscons/scterm-sc.c optional sc +dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc +dev/syscons/teken/teken.c optional sc dev/tsec/if_tsec.c optional tsec dev/tsec/if_tsec_ocp.c optional tsec mpc85xx dev/uart/uart_bus_ocp.c optional uart mpc85xx Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Thu Jan 1 12:14:39 2009 (r186680) +++ head/sys/conf/files.sparc64 Thu Jan 1 13:26:53 2009 (r186681) @@ -55,8 +55,9 @@ dev/pcf/pcf_ebus.c optional pcf ebus dev/sound/sbus/cs4231.c optional snd_audiocs ebus | \ snd_audiocs sbus dev/syscons/scgfbrndr.c optional sc -dev/syscons/scterm-sc.c optional sc +dev/syscons/scterm-teken.c optional sc dev/syscons/scvtb.c optional sc +dev/syscons/teken/teken.c optional sc dev/uart/uart_cpu_sparc64.c optional uart dev/uart/uart_kbd_sun.c optional uart sc kern/syscalls.c optional ktr Added: head/sys/dev/syscons/scterm-teken.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/syscons/scterm-teken.c Thu Jan 1 13:26:53 2009 (r186681) @@ -0,0 +1,504 @@ +/*- + * Copyright (c) 1999 Kazutaka YOKOTA + * All rights reserved. + * + * Copyright (c) 2008-2009 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer as + * the first lines of this file unmodified. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_syscons.h" + +#include +#include +#include +#include +#include + +#if defined(__sparc64__) || defined(__powerpc__) +#include +#else +#include +#endif + +#include + +#include + +static void scteken_revattr(unsigned char, teken_attr_t *); + +static sc_term_init_t scteken_init; +static sc_term_term_t scteken_term; +static sc_term_puts_t scteken_puts; +static sc_term_ioctl_t scteken_ioctl; +static sc_term_default_attr_t scteken_default_attr; +static sc_term_clear_t scteken_clear; +static sc_term_input_t scteken_input; +static void scteken_nop(void); + +typedef struct { + teken_t ts_teken; + int ts_busy; +} teken_stat; + +static teken_stat reserved_teken_stat; + +static sc_term_sw_t sc_term_scteken = { + { NULL, NULL }, + "scteken", /* emulator name */ + "teken terminal", /* description */ + "*", /* matching renderer */ + sizeof(teken_stat), /* softc size */ + 0, + scteken_init, + scteken_term, + scteken_puts, + scteken_ioctl, + (sc_term_reset_t *)scteken_nop, + scteken_default_attr, + scteken_clear, + (sc_term_notify_t *)scteken_nop, + scteken_input, +}; + +SCTERM_MODULE(scteken, sc_term_scteken); + +static tf_bell_t scteken_bell; +static tf_cursor_t scteken_cursor; +static tf_putchar_t scteken_putchar; +static tf_fill_t scteken_fill; +static tf_copy_t scteken_copy; +static tf_param_t scteken_param; +static tf_respond_t scteken_respond; + +static const teken_funcs_t scteken_funcs = { + .tf_bell = scteken_bell, + .tf_cursor = scteken_cursor, + .tf_putchar = scteken_putchar, + .tf_fill = scteken_fill, + .tf_copy = scteken_copy, + .tf_param = scteken_param, + .tf_respond = scteken_respond, +}; + +static int +scteken_init(scr_stat *scp, void **softc, int code) +{ + teken_stat *ts = scp->ts; + teken_pos_t tp; + + if (*softc == NULL) { + if (reserved_teken_stat.ts_busy) + return (EINVAL); + *softc = &reserved_teken_stat; + } + ts = *softc; + + switch (code) { + case SC_TE_COLD_INIT: + ++sc_term_scteken.te_refcount; + ts->ts_busy = 1; + /* FALLTHROUGH */ + case SC_TE_WARM_INIT: + teken_init(&ts->ts_teken, &scteken_funcs, scp); + + tp.tp_row = scp->ysize; + tp.tp_col = scp->xsize; + teken_set_winsize(&ts->ts_teken, &tp); + + tp.tp_row = scp->cursor_pos / scp->xsize; + tp.tp_col = scp->cursor_pos % scp->xsize; + teken_set_cursor(&ts->ts_teken, &tp); + break; + } + + return (0); +} + +static int +scteken_term(scr_stat *scp, void **softc) +{ + + if (*softc == &reserved_teken_stat) { + *softc = NULL; + reserved_teken_stat.ts_busy = 0; + } + --sc_term_scteken.te_refcount; + + return (0); +} + +static void +scteken_puts(scr_stat *scp, u_char *buf, int len) +{ + teken_stat *ts = scp->ts; + + scp->sc->write_in_progress++; + teken_input(&ts->ts_teken, buf, len); + scp->sc->write_in_progress--; +} + +static int +scteken_ioctl(scr_stat *scp, struct tty *tp, u_long cmd, caddr_t data, + struct thread *td) +{ + vid_info_t *vi; + + switch (cmd) { + case GIO_ATTR: /* get current attributes */ + *(int*)data = SC_NORM_ATTR; + return (0); + case CONS_GETINFO: /* get current (virtual) console info */ + /* XXX: INCORRECT! */ + vi = (vid_info_t *)data; + if (vi->size != sizeof(struct vid_info)) + return EINVAL; + vi->mv_norm.fore = SC_NORM_ATTR & 0x0f; + vi->mv_norm.back = (SC_NORM_ATTR >> 4) & 0x0f; + vi->mv_rev.fore = SC_NORM_ATTR & 0x0f; + vi->mv_rev.back = (SC_NORM_ATTR >> 4) & 0x0f; + /* + * The other fields are filled by the upper routine. XXX + */ + return (ENOIOCTL); + } + + return (ENOIOCTL); +} + +static void +scteken_default_attr(scr_stat *scp, int color, int rev_color) +{ + teken_stat *ts = scp->ts; + teken_attr_t ta; + + scteken_revattr(color, &ta); + teken_set_defattr(&ts->ts_teken, &ta); +} + +static void +scteken_clear(scr_stat *scp) +{ + + sc_move_cursor(scp, 0, 0); + sc_vtb_clear(&scp->vtb, scp->sc->scr_map[0x20], SC_NORM_ATTR << 8); + mark_all(scp); +} + +static int +scteken_input(scr_stat *scp, int c, struct tty *tp) +{ + + return FALSE; +} + +static void +scteken_nop(void) +{ + +} + +/* + * libteken routines. + */ + +static const unsigned char fgcolors_normal[TC_NCOLORS] = { + FG_BLACK, FG_RED, FG_GREEN, FG_BROWN, + FG_BLUE, FG_MAGENTA, FG_CYAN, FG_LIGHTGREY, +}; + +static const unsigned char fgcolors_bold[TC_NCOLORS] = { + FG_DARKGREY, FG_LIGHTRED, FG_LIGHTGREEN, FG_YELLOW, + FG_LIGHTBLUE, FG_LIGHTMAGENTA, FG_LIGHTCYAN, FG_WHITE, +}; + +static const unsigned char bgcolors[TC_NCOLORS] = { + BG_BLACK, BG_RED, BG_GREEN, BG_BROWN, + BG_BLUE, BG_MAGENTA, BG_CYAN, BG_LIGHTGREY, +}; + +static void +scteken_revattr(unsigned char color, teken_attr_t *a) +{ + teken_color_t fg, bg; + + /* + * XXX: Reverse conversion of syscons to teken attributes. Not + * realiable. Maybe we should turn it into a 1:1 mapping one of + * these days? + */ + + a->ta_format = 0; + a->ta_fgcolor = TC_WHITE; + a->ta_bgcolor = TC_BLACK; + +#ifdef FG_BLINK + if (color & FG_BLINK) { + a->ta_format |= TF_BLINK; + color &= ~FG_BLINK; + } +#endif /* FG_BLINK */ + + for (fg = 0; fg < TC_NCOLORS; fg++) { + for (bg = 0; bg < TC_NCOLORS; bg++) { + if ((fgcolors_normal[fg] | bgcolors[bg]) == color) { + a->ta_fgcolor = fg; + a->ta_bgcolor = bg; + return; + } + + if ((fgcolors_bold[fg] | bgcolors[bg]) == color) { + a->ta_fgcolor = fg; + a->ta_bgcolor = bg; + a->ta_format |= TF_BOLD; + return; + } + } + } +} + +static inline unsigned int +scteken_attr(const teken_attr_t *a) +{ + unsigned int attr = 0; + + if (a->ta_format & TF_BOLD) + attr |= fgcolors_bold[a->ta_fgcolor]; + else + attr |= fgcolors_normal[a->ta_fgcolor]; + attr |= bgcolors[a->ta_bgcolor]; + +#ifdef FG_UNDERLINE + if (a->ta_format & TF_UNDERLINE) + attr |= FG_UNDERLINE; +#endif /* FG_UNDERLINE */ +#ifdef FG_BLINK + if (a->ta_format & TF_BLINK) + attr |= FG_BLINK; +#endif /* FG_BLINK */ + + return (attr << 8); +} + +static void +scteken_bell(void *arg) +{ + scr_stat *scp = arg; + + sc_bell(scp, scp->bell_pitch, scp->bell_duration); +} + +static void +scteken_cursor(void *arg, const teken_pos_t *p) +{ + scr_stat *scp = arg; + + sc_move_cursor(scp, p->tp_col, p->tp_row); +} + +static void +scteken_putchar(void *arg, const teken_pos_t *tp, teken_char_t c, + const teken_attr_t *a) +{ + scr_stat *scp = arg; + u_char *map; + u_char ch; + vm_offset_t p; + int cursor, attr; + +#ifdef TEKEN_UTF8 + if (c >= 0x80) { + /* XXX: Don't display UTF-8 yet. */ + attr = (FG_YELLOW|BG_RED) << 8; + ch = '?'; + } else +#endif /* TEKEN_UTF8 */ + { + attr = scteken_attr(a); + ch = c; + } + + map = scp->sc->scr_map; + + cursor = tp->tp_row * scp->xsize + tp->tp_col; + p = sc_vtb_pointer(&scp->vtb, cursor); + sc_vtb_putchar(&scp->vtb, p, map[ch], attr); + + mark_for_update(scp, cursor); + /* + * XXX: Why do we need this? Only marking `cursor' should be + * enough. Without this line, we get artifacts. + */ + mark_for_update(scp, imin(cursor + 1, scp->xsize * scp->ysize - 1)); +} + +static void +scteken_fill(void *arg, const teken_rect_t *r, teken_char_t c, + const teken_attr_t *a) +{ + scr_stat *scp = arg; + u_char *map; + u_char ch; + unsigned int width; + int attr, row; + +#ifdef TEKEN_UTF8 + if (c >= 0x80) { + /* XXX: Don't display UTF-8 yet. */ + attr = (FG_YELLOW|BG_RED) << 8; + ch = '?'; + } else +#endif /* TEKEN_UTF8 */ + { + attr = scteken_attr(a); + ch = c; + } + + map = scp->sc->scr_map; + + if (r->tr_begin.tp_col == 0 && r->tr_end.tp_col == scp->xsize) { + /* Single contiguous region to fill. */ + sc_vtb_erase(&scp->vtb, r->tr_begin.tp_row * scp->xsize, + (r->tr_end.tp_row - r->tr_begin.tp_row) * scp->xsize, + map[ch], attr); + } else { + /* Fill display line by line. */ + width = r->tr_end.tp_col - r->tr_begin.tp_col; + + for (row = r->tr_begin.tp_row; row < r->tr_end.tp_row; row++) { + sc_vtb_erase(&scp->vtb, r->tr_begin.tp_row * + scp->xsize + r->tr_begin.tp_col, + width, map[ch], attr); + } + } + + /* Mark begin and end positions to be refreshed. */ + mark_for_update(scp, + r->tr_begin.tp_row * scp->xsize + r->tr_begin.tp_col); + mark_for_update(scp, + (r->tr_end.tp_row - 1) * scp->xsize + (r->tr_end.tp_col - 1)); + sc_remove_cutmarking(scp); +} + +static void +scteken_copy(void *arg, const teken_rect_t *r, const teken_pos_t *p) +{ + scr_stat *scp = arg; + unsigned int width; + int src, dst, end; + +#ifndef SC_NO_HISTORY + /* + * We count a line of input as history if we perform a copy of + * one whole line upward. In other words: if a line of text gets + * overwritten by a rectangle that's right below it. + */ + if (scp->history != NULL && + r->tr_begin.tp_col == 0 && r->tr_end.tp_col == scp->xsize && + r->tr_begin.tp_row == p->tp_row + 1) { + sc_hist_save_one_line(scp, p->tp_row); + } +#endif + + if (r->tr_begin.tp_col == 0 && r->tr_end.tp_col == scp->xsize) { + /* Single contiguous region to copy. */ + sc_vtb_move(&scp->vtb, r->tr_begin.tp_row * scp->xsize, + p->tp_row * scp->xsize, + (r->tr_end.tp_row - r->tr_begin.tp_row) * scp->xsize); + } else { + /* Copy line by line. */ + width = r->tr_end.tp_col - r->tr_begin.tp_col; + + if (p->tp_row < r->tr_begin.tp_row) { + /* Copy from top to bottom. */ + src = r->tr_begin.tp_row * scp->xsize + + r->tr_begin.tp_col; + end = r->tr_end.tp_row * scp->xsize + + r->tr_end.tp_col; + dst = p->tp_row * scp->xsize + p->tp_col; + + while (src < end) { + sc_vtb_move(&scp->vtb, src, dst, width); + + src += scp->xsize; + dst += scp->xsize; + } + } else { + /* Copy from bottom to top. */ + src = (r->tr_end.tp_row - 1) * scp->xsize + + r->tr_begin.tp_col; + end = r->tr_begin.tp_row * scp->xsize + + r->tr_begin.tp_col; + dst = (p->tp_row + r->tr_end.tp_row - + r->tr_begin.tp_row - 1) * scp->xsize + p->tp_col; + + while (src >= end) { + sc_vtb_move(&scp->vtb, src, dst, width); + + src -= scp->xsize; + dst -= scp->xsize; + } + } + } + + /* Mark begin and end positions to be refreshed. */ + mark_for_update(scp, + p->tp_row * scp->xsize + p->tp_col); + mark_for_update(scp, + (p->tp_row + r->tr_end.tp_row - r->tr_begin.tp_row - 1) * + scp->xsize + + (p->tp_col + r->tr_end.tp_col - r->tr_begin.tp_col - 1)); + sc_remove_cutmarking(scp); +} + +static void +scteken_param(void *arg, int cmd, int value) +{ + scr_stat *scp = arg; + + switch (cmd) { + case TP_SHOWCURSOR: + if (value) { + sc_change_cursor_shape(scp, + CONS_RESET_CURSOR|CONS_LOCAL_CURSOR, -1, -1); + } else { + sc_change_cursor_shape(scp, + CONS_HIDDEN_CURSOR|CONS_LOCAL_CURSOR, -1, -1); + } + break; + case TP_SWITCHVT: + sc_switch_scr(scp->sc, value); + break; + } +} + +static void +scteken_respond(void *arg, const void *buf, size_t len) +{ + scr_stat *scp = arg; + + sc_respond(scp, buf, len); +} Modified: head/sys/dev/syscons/scterm.c ============================================================================== --- head/sys/dev/syscons/scterm.c Thu Jan 1 12:14:39 2009 (r186680) +++ head/sys/dev/syscons/scterm.c Thu Jan 1 13:26:53 2009 (r186681) @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include SET_DECLARE(scterm_set, sc_term_sw_t); Modified: head/sys/dev/syscons/syscons.c ============================================================================== --- head/sys/dev/syscons/syscons.c Thu Jan 1 12:14:39 2009 (r186680) +++ head/sys/dev/syscons/syscons.c Thu Jan 1 13:26:53 2009 (r186681) @@ -2741,6 +2741,16 @@ scinit(int unit, int flags) init_scp(sc, sc->first_vty, scp); sc_vtb_init(&scp->vtb, VTB_MEMORY, scp->xsize, scp->ysize, (void *)sc_buffer, FALSE); + + /* move cursors to the initial positions */ + if (col >= scp->xsize) + col = 0; + if (row >= scp->ysize) + row = scp->ysize - 1; + scp->xpos = col; + scp->ypos = row; + scp->cursor_pos = scp->cursor_oldpos = row*scp->xsize + col; + if (sc_init_emulator(scp, SC_DFLT_TERM)) sc_init_emulator(scp, "*"); (*scp->tsw->te_default_attr)(scp, @@ -2764,15 +2774,6 @@ scinit(int unit, int flags) sc_vtb_copy(&scp->scr, 0, &scp->vtb, 0, scp->xsize*scp->ysize); #endif - /* move cursors to the initial positions */ - if (col >= scp->xsize) - col = 0; - if (row >= scp->ysize) - row = scp->ysize - 1; - scp->xpos = col; - scp->ypos = row; - scp->cursor_pos = scp->cursor_oldpos = row*scp->xsize + col; - if (bios_value.cursor_end < scp->font_size) sc->dflt_curs_attr.base = scp->font_size - bios_value.cursor_end - 1; @@ -3569,7 +3570,7 @@ sc_show_font(scr_stat *scp, int page) #endif /* !SC_NO_FONT_LOADING */ void -sc_paste(scr_stat *scp, u_char *p, int count) +sc_paste(scr_stat *scp, const u_char *p, int count) { struct tty *tp; u_char *rmap; @@ -3584,6 +3585,22 @@ sc_paste(scr_stat *scp, u_char *p, int c } void +sc_respond(scr_stat *scp, const u_char *p, int count) +{ + struct tty *tp; + + tp = SC_DEV(scp->sc, scp->sc->cur_scp->index); + if (!tty_opened(tp)) + return; + for (; count > 0; --count) + ttydisc_rint(tp, *p++, 0); +#if 0 + /* XXX: we can't call ttydisc_rint_done() here! */ + ttydisc_rint_done(tp); +#endif +} + +void sc_bell(scr_stat *scp, int pitch, int duration) { if (cold || shutdown_in_progress || !enable_bell) Modified: head/sys/dev/syscons/syscons.h ============================================================================== --- head/sys/dev/syscons/syscons.h Thu Jan 1 12:14:39 2009 (r186680) +++ head/sys/dev/syscons/syscons.h Thu Jan 1 13:26:53 2009 (r186681) @@ -563,7 +563,8 @@ int sc_clean_up(scr_stat *scp); int sc_switch_scr(sc_softc_t *sc, u_int next_scr); void sc_alloc_scr_buffer(scr_stat *scp, int wait, int discard); int sc_init_emulator(scr_stat *scp, char *name); -void sc_paste(scr_stat *scp, u_char *p, int count); +void sc_paste(scr_stat *scp, const u_char *p, int count); +void sc_respond(scr_stat *scp, const u_char *p, int count); void sc_bell(scr_stat *scp, int pitch, int duration); /* schistory.c */ Added: head/sys/dev/syscons/teken/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/syscons/teken/Makefile Thu Jan 1 13:26:53 2009 (r186681) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +PROG= teken_demo +SRCS= teken_demo.c teken.c teken_state.h +CLEANFILES= teken_state.h teken.log +LDADD= -lncurses -lutil +NO_MAN= +WARNS?= 6 + +teken_state.h: gensequences sequences + awk -f gensequences sequences > ${.TARGET} + +.include Added: head/sys/dev/syscons/teken/gensequences ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/syscons/teken/gensequences Thu Jan 1 13:26:53 2009 (r186681) @@ -0,0 +1,157 @@ +#!/usr/bin/awk -f + +#- +# Copyright (c) 2008-2009 Ed Schouten +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +function die(msg) { + print msg; + exit 1; +} + +function cchar(str) { + if (str == "^[") + return "\\x1B"; + + return str; +} + +BEGIN { +FS = "\t+" + +while (getline > 0) { + if (NF == 0 || $1 ~ /^#/) + continue; + + if (NF != 3 && NF != 4) + die("Invalid line layout: " NF " columns"); + + split($3, sequence, " +"); + nsequences = 0; + for (s in sequence) + nsequences++; + + prefix = ""; + l_prefix_name[""] = "teken_state_init"; + for (i = 1; i < nsequences; i++) { + n = prefix sequence[i]; + l_prefix_parent[n] = prefix; + l_prefix_suffix[n] = sequence[i]; + if (!l_prefix_name[n]) + l_prefix_name[n] = "teken_state_" ++npr; + prefix = n; + } + + suffix = sequence[nsequences]; + cmd = prefix suffix; + + # Fill lists + if (l_cmd_name[cmd] != "") + die(cmd " already exists"); + l_cmd_prefix[cmd] = prefix; + l_cmd_suffix[cmd] = suffix; + l_cmd_args[cmd] = $4; + l_cmd_abbr[cmd] = $1; + l_cmd_name[cmd] = $2; + l_cmd_c_name[cmd] = "teken_subr_" tolower($2); + gsub(" ", "_", l_cmd_c_name[cmd]); + + if ($4 != "") + l_prefix_numbercmds[prefix]++; +} + +print "/* Generated file. Do not edit. */"; +print ""; + +for (p in l_prefix_name) { + if (l_prefix_name[p] != "teken_state_init") + print "static teken_state_t " l_prefix_name[p] ";"; +} + +for (p in l_prefix_name) { + print ""; + print "/* '" p "' */"; + print "static void"; + print l_prefix_name[p] "(teken_t *t, teken_char_t c)"; + print "{"; + + if (l_prefix_numbercmds[p] > 0) { + print ""; + print "\tif (teken_state_numbers(t, c))"; + print "\t\treturn;"; + } + + print ""; + print "\tswitch (c) {"; + for (c in l_cmd_prefix) { + if (l_cmd_prefix[c] != p) + continue; + + print "\tcase '" cchar(l_cmd_suffix[c]) "': /* " l_cmd_abbr[c] ": " l_cmd_name[c] " */"; + + if (l_cmd_args[c] == "v") { + print "\t\t" l_cmd_c_name[c] "(t, t->t_curnum, t->t_nums);"; + } else { + printf "\t\t%s(t", l_cmd_c_name[c]; + split(l_cmd_args[c], args, " "); + for (a = 1; args[a] != ""; a++) { + if (args[a] == "n") + printf ", (t->t_curnum < %d || t->t_nums[%d] == 0) ? 1 : t->t_nums[%d]", a, (a - 1), (a - 1); + else if (args[a] == "r") + printf ", t->t_curnum < %d ? 0 : t->t_nums[%d]", a, (a - 1); + else + die("Invalid argument type: " args[a]); + } + print ");"; + } + print "\t\tbreak;"; + } + for (pc in l_prefix_parent) { + if (l_prefix_parent[pc] != p) + continue; + print "\tcase '" cchar(l_prefix_suffix[pc]) "':"; + print "\t\tteken_state_switch(t, " l_prefix_name[pc] ");"; + print "\t\treturn;"; + } + + print "\tdefault:"; + if (l_prefix_name[p] == "teken_state_init") { + print "\t\tteken_subr_regular_character(t, c);"; + } else { + print "\t\tteken_printf(\"Unsupported sequence in " l_prefix_name[p] ": %u\\n\", (unsigned int)c);"; + } + print "\t\tbreak;"; + + print "\t}"; + + if (l_prefix_name[p] != "teken_state_init") { + print ""; + print "\tteken_state_switch(t, teken_state_init);"; + } + print "}"; +} + +} Added: head/sys/dev/syscons/teken/sequences ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/syscons/teken/sequences Thu Jan 1 13:26:53 2009 (r186681) @@ -0,0 +1,107 @@ +#- +# Copyright (c) 2008-2009 Ed Schouten +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +# File format is as follows: +# Abbr Abbreviation of sequence name +# Name Sequence name (will be converted to C function name) +# Sequence Bytes that form the sequence +# Arguments Standard value of arguments passed to this sequence +# - `n' non-zero number (0 gets converted to 1) +# - `r' regular numeric argument +# - `v' means a variable number of arguments + +# Abbr Name Sequence Arguments +CBT Cursor Backward Tabulation ^[ [ Z n +CHT Cursor Forward Tabulation ^[ [ I n +CNL Cursor Next Line ^[ [ E n +CPL Cursor Previous Line ^[ [ F n +CPR Cursor Position Report ^[ [ n r +CUB Cursor Backward ^[ [ D n +CUD Cursor Down ^[ [ B n +CUD Cursor Down ^[ [ e n +CUF Cursor Forward ^[ [ C n +CUF Cursor Forward ^[ [ a n +CUP Cursor Position ^[ [ H n n +CUP Cursor Position ^[ [ f n n +CUU Cursor Up ^[ [ A n +DA1 Primary Device Attributes ^[ [ c r +DA2 Secondary Device Attributes ^[ [ > c r +DC Delete character ^[ [ P n +DCS Device Control String ^[ P +DECALN Alignment test ^[ # 8 +DECDHL Double Height Double Width Line Top ^[ # 3 +DECDHL Double Height Double Width Line Bottom ^[ # 4 +DECDWL Single Height Double Width Line ^[ # 6 +DECKPAM Keypad application mode ^[ = +DECKPNM Keypad numeric mode ^[ > +DECRC Restore cursor ^[ 8 +DECRC Restore cursor ^[ [ u +DECRM Reset DEC mode ^[ [ ? l r +DECSC Save cursor ^[ 7 +DECSC Save cursor ^[ [ s +DECSM Set DEC mode ^[ [ ? h r +DECSTBM Set top and bottom margins ^[ [ r r r +DECSWL Single Height Single Width Line ^[ # 5 +DL Delete line ^[ [ M n +DSR Device Status Report ^[ [ ? n r +ECH Erase character ^[ [ X n +ED Erase display ^[ [ J r +EL Erase line ^[ [ K r +HPA Horizontal Position Absolute ^[ [ G n +HPA Horizontal Position Absolute ^[ [ ` n +HTS Horizontal Tab Set ^[ H +ICH Insert character ^[ [ @ n +IL Insert line ^[ [ L n +IND Index ^[ D +NEL Next line ^[ E +RI Reverse index ^[ M +RIS Reset to Initial State ^[ c +RM Reset Mode ^[ [ l r +SCS SCS ^[ ( 0 +SCS SCS ^[ ( 1 +SCS SCS ^[ ( 2 +SCS SCS ^[ ( A +SCS SCS ^[ ( B +SCS SCS ^[ ) 0 +SCS SCS ^[ ) 1 +SCS SCS ^[ ) 2 +SCS SCS ^[ ) A +SCS SCS ^[ ) B +SD Pan Up ^[ [ T n +SGR Set Graphic Rendition ^[ [ m v +SM Set Mode ^[ [ h r +ST String Terminator ^[ \\ +SU Pan Down ^[ [ S n +TBC Tab Clear ^[ [ g r +VPA Vertical Position Absolute ^[ [ d n + +# Cons25 compatibility sequences +C25CURS Cons25 set cursor type ^[ [ = S r +C25VTSW Cons25 switch virtual terminal ^[ [ z r + +# VT52 compatibility +#DECID VT52 DECID ^[ Z Added: head/sys/dev/syscons/teken/teken.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/syscons/teken/teken.c Thu Jan 1 13:26:53 2009 (r186681) @@ -0,0 +1,386 @@ +/*- + * Copyright (c) 2008-2009 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 13:44:53 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13119106566C; Thu, 1 Jan 2009 13:44:53 +0000 (UTC) (envelope-from rik@inse.ru) Received: from mail.inse.ru (mail.inse.ru [144.206.128.1]) by mx1.freebsd.org (Postfix) with ESMTP id 98B2F8FC0C; Thu, 1 Jan 2009 13:44:52 +0000 (UTC) (envelope-from rik@inse.ru) Received: from www.inse.ru (www.inse.ru [144.206.128.1]) by mail.inse.ru (Postfix) with ESMTPSA id 750E733C51; Thu, 1 Jan 2009 16:44:50 +0300 (MSK) Message-ID: <495CC901.7080304@localhost.inse.ru> Date: Thu, 01 Jan 2009 16:45:37 +0300 From: Roman Kurakin User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: "M. Warner Losh" References: <200812271522.mBRFMMHY074982@svn.freebsd.org> <20081229.114241.756909212.imp@bsdimp.com> <495B406F.2040305@localhost.inse.ru> <20090101.000643.1543764949.imp@bsdimp.com> In-Reply-To: <20090101.000643.1543764949.imp@bsdimp.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: rik@FreeBSD.org, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186520 - head/sys/dev/puc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 13:44:53 -0000 M. Warner Losh wrote: > In message: <495B406F.2040305@localhost.inse.ru> > Roman Kurakin writes: > : M. Warner Losh wrote: > : > In message: <200812271522.mBRFMMHY074982@svn.freebsd.org> > : > Roman Kurakin writes: > : > : Author: rik > : > : Date: Sat Dec 27 15:22:22 2008 > : > : New Revision: 186520 > : > : URL: http://svn.freebsd.org/changeset/base/186520 > : > : > : > : Log: > : > : Add support for the Oxford OX16PCI958-based card. > : > : > : > : Note, that the patch provided with this card for the Linux states that > : > : the card uses DEFAULT_RCLK * 2, while in fact it is '* 10'. So probably > : > : we should also use the subdevice/subvendord here. For now just ignore > : > : that fact. > : > > : > I've had problems with doing that on some Oxford based cards. The > : > vendor that uses them doesn't set them up, so you can't tell my > : > cardbus oxford card from the pcie oxford card that someone else sent > : > me patches for: both with different clock multipliers... > : > > : Probably we need to implement AUTODETECT_RCLK. I've had the patch, > : but it worked only for modules, cause there was no working timers while the > : cards probe time if the driver was compiled in. I've planned to move > : detection > : code to the first open and do some cleanup after the detection, but > : didn't do > : that. > > I'd like to see that. I think we can defer the detection of RCLK to > The initial code, that was the part of the Cronyx patch for sio(4), is smth like this one excerpt: +#undef inb +#undef outb +#define inb(port) sio_inb (port) +#define outb(port,val) sio_outb (port, val) + +static __inline u_char +sio_getreg (com, off) + struct com_s *com; + bus_size_t off; +{ + if ((unsigned) com->bsh & ~0xffff) + return *(volatile u_char*) (com->bsh + off); + return bus_space_read_1 (com->bst, com->bsh, off); +} + +static __inline void +sio_setreg (com, off, val) + struct com_s *com; + bus_size_t off; + u_char val; +{ + if ((unsigned) com->bsh & ~0xffff) + *(volatile u_char*) (com->bsh + off) = val; + else + bus_space_write_1 (com->bst, com->bsh, off, val); +} + +/* * handle sysctl read/write requests for console speed * * In addition to setting comdefaultrate for I/O through /dev/console, @@ -475,6 +548,181 @@ return (0); } +#define VOLATILE_INT *(volatile int *)& +/* + * Find the oscillator frequency of the UART. + */ +static int +sio_find_freq(com) + struct com_s *com; +{ + int t0, n; + u_char lsr; + + /* Set the loopback mode, 57600 baud. */ + outb(com->int_ctl_port, 0); + sio_setreg(com, com_cfcr, CFCR_DLAB); + sio_setreg(com, com_dlbh, 0); + sio_setreg(com, com_dlbl, 2); + sio_setreg(com, com_cfcr, CFCR_8BITS); + sio_setreg(com, com_fifo, 0); + outb(com->modem_ctl_port, MCR_LOOPBACK); + (void) inb (com->line_status_port); + + /* Catch the tick. */ + t0 = VOLATILE_INT ticks; + while (VOLATILE_INT ticks == t0) + continue; + + /* Run until the next tick, transmitting data. */ + n = 0; + t0 = VOLATILE_INT ticks; + while (VOLATILE_INT ticks == t0) { + lsr = inb (com->line_status_port); + if (lsr & LSR_TXRDY) + sio_setreg(com, com_data, 0x5A); + + if (lsr & LSR_RXRDY) { + (void) inb (com->data_port); + ++n; + } + } + outb(com->modem_ctl_port, com->mcr_image); + sio_setreg(com, com_cfcr, com->cfcr_image); + sio_setreg(com, com_fifo, FIFO_RCV_RST | FIFO_XMT_RST | + com->fifo_image); + if (COM_IIR_TXRDYBUG(com->flags)) { + outb(com->int_ctl_port, IER_ERXRDY | IER_ERLS + | IER_EMSC); + } else { + outb(com->int_ctl_port, IER_ERXRDY | IER_ETXRDY + | IER_ERLS | IER_EMSC); + } + + n = (n * hz + 5760/2) / 5760; + if (n > 4) return 8 * 1843200; + if (n > 2) return 4 * 1843200; + if (n > 1) return 2 * 1843200; + return DEFAULT_RCLK; +} One of the multiport Cronyx card has the hardware switch to change the clock, and before such patch more than a half of requests for support was due to incorrect speeds, cause users didn't understand what they were doing by this switch and how the software should be configured based on its value. > later. How accurate is this, btw? How dependent on timing of > Do we need very strict accuracy here? For the detection of the multiplier before DEFAULT_RCLK it should be enough IMHO. rik > interrupts is it? > > Warner > From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 13:56:32 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9393E1065670; Thu, 1 Jan 2009 13:56:32 +0000 (UTC) (envelope-from rik@inse.ru) Received: from mail.inse.ru (mail.inse.ru [144.206.128.1]) by mx1.freebsd.org (Postfix) with ESMTP id 4834D8FC1A; Thu, 1 Jan 2009 13:56:32 +0000 (UTC) (envelope-from rik@inse.ru) Received: from www.inse.ru (www.inse.ru [144.206.128.1]) by mail.inse.ru (Postfix) with ESMTPSA id 9734233C51; Thu, 1 Jan 2009 16:56:30 +0300 (MSK) Message-ID: <495CCBBD.5060605@localhost.inse.ru> Date: Thu, 01 Jan 2009 16:57:17 +0300 From: Roman Kurakin User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: Bruce Evans References: <200812271522.mBRFMMHY074982@svn.freebsd.org> <20081229.114241.756909212.imp@bsdimp.com> <495B406F.2040305@localhost.inse.ru> <20090101.000643.1543764949.imp@bsdimp.com> <20090101222434.S7598@delplex.bde.org> In-Reply-To: <20090101222434.S7598@delplex.bde.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: rik@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "M. Warner Losh" Subject: Re: svn commit: r186520 - head/sys/dev/puc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 13:56:33 -0000 Hi Bruce, Bruce Evans wrote: > On Thu, 1 Jan 2009, M. Warner Losh wrote: > >> In message: <495B406F.2040305@localhost.inse.ru> >> Roman Kurakin writes: >> : Probably we need to implement AUTODETECT_RCLK. I've had the patch, >> : but it worked only for modules, cause there was no working timers >> while the >> : cards probe time if the driver was compiled in. I've planned to move >> : detection >> : code to the first open and do some cleanup after the detection, but >> : didn't do >> : that. >> >> I'd like to see that. I think we can defer the detection of RCLK to >> later. How accurate is this, btw? How dependent on timing of >> interrupts is it? > > This cannot work in the following cases: > - serial consoles. The device is then used as a low-level console > long before the first open and in a context where timer interrupts > are unavailable even if timers are initialized. However, at least > on i386's, the main (i8254) timer is initialized just before > console initialization (which is just before the first possible use > of a console (for booting with -d)), to support the syscons driver > using DELAY() which requires the timer to be initialized. DELAY() > is probably sufficient for detecting RCLK if it is possible to > detect RCLK at all (set the speed low enough so that polling every > millisecond after DELAY(1000) is good enough). We can implement some sort of sysctl, hint or smth like this. I do not think that AUTODETECT_RCLK should be used by default everywhere, only in special cases. And for that cases it could be just to inform the user about the value for the 'hint' to use. > - emulated hardware. The emulation only needs to emulate the specified > speed on the external interface. It would take an unreasonably high > quality emulation to get the timing right in all cases, especially > for the loopback case which should be used here. In the loopback > case, the external interface hardware would not even be used, except > part of the unreasonably high quality implementation would involve > using the external interface to the extent of telling it to do nothing > except return its timing signals so that the looped back input arrives > at the same time as it would on the other side of the external > interface > if it weren't looped back. Probably this is not the case. I doubt that emulated hardware should hit such problems that it will need autodetction for it. Any way, if such case will arise, such autodetection shouldn't not do more harm than it is. rik > Bruce From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 14:01:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4E4C106566B; Thu, 1 Jan 2009 14:01:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2ACC8FC1C; Thu, 1 Jan 2009 14:01:21 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n01E1L3j071255; Thu, 1 Jan 2009 14:01:21 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n01E1LD3071252; Thu, 1 Jan 2009 14:01:21 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901011401.n01E1LD3071252@svn.freebsd.org> From: Marius Strobl Date: Thu, 1 Jan 2009 14:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186682 - in head/sys/sparc64: include sparc64 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 14:01:22 -0000 Author: marius Date: Thu Jan 1 14:01:21 2009 New Revision: 186682 URL: http://svn.freebsd.org/changeset/base/186682 Log: - Currently the PMAP code is laid out to let the kernel TSB cover the whole KVA space using one locked 4MB dTLB entry per GB of physical memory. On Cheetah-class machines only the dt16 can hold locked entries though, which would be completely consumed for the kernel TSB on machines with >= 16GB. Therefore limit the KVA space to use no more than half of the lockable dTLB slots, given that we need them also for other things. - Add sanity checks which ensure that we don't exhaust the (lockable) TLB slots. Modified: head/sys/sparc64/include/tlb.h head/sys/sparc64/sparc64/machdep.c head/sys/sparc64/sparc64/pmap.c Modified: head/sys/sparc64/include/tlb.h ============================================================================== --- head/sys/sparc64/include/tlb.h Thu Jan 1 13:26:53 2009 (r186681) +++ head/sys/sparc64/include/tlb.h Thu Jan 1 14:01:21 2009 (r186682) @@ -129,6 +129,8 @@ typedef void tlb_flush_user_t(void); struct pmap; struct tlb_entry; +extern int dtlb_slots; +extern int itlb_slots; extern int kernel_tlb_slots; extern struct tlb_entry *kernel_tlbs; Modified: head/sys/sparc64/sparc64/machdep.c ============================================================================== --- head/sys/sparc64/sparc64/machdep.c Thu Jan 1 13:26:53 2009 (r186681) +++ head/sys/sparc64/sparc64/machdep.c Thu Jan 1 14:01:21 2009 (r186682) @@ -115,6 +115,8 @@ typedef int ofw_vec_t(void *); extern vm_offset_t ksym_start, ksym_end; #endif +int dtlb_slots; +int itlb_slots; struct tlb_entry *kernel_tlbs; int kernel_tlb_slots; @@ -276,7 +278,7 @@ sparc64_init(caddr_t mdp, u_long o1, u_l tick_stop(); /* - * Set up Open Firmware entry points + * Set up Open Firmware entry points. */ ofw_tba = rdpr(tba); ofw_vec = (u_long)vec; @@ -380,6 +382,19 @@ sparc64_init(caddr_t mdp, u_long o1, u_l end = (vm_offset_t)_end; } + /* + * Determine the TLB slot maxima, which are expected to be + * equal across all CPUs. + * NB: for Cheetah-class CPUs, these properties only refer + * to the t16s. + */ + if (OF_getprop(pc->pc_node, "#dtlb-entries", &dtlb_slots, + sizeof(dtlb_slots)) == -1) + panic("sparc64_init: cannot determine number of dTLB slots"); + if (OF_getprop(pc->pc_node, "#itlb-entries", &itlb_slots, + sizeof(itlb_slots)) == -1) + panic("sparc64_init: cannot determine number of iTLB slots"); + cache_init(pc); cache_enable(); uma_set_align(pc->pc_cache.dc_linesize - 1); Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Thu Jan 1 13:26:53 2009 (r186681) +++ head/sys/sparc64/sparc64/pmap.c Thu Jan 1 14:01:21 2009 (r186682) @@ -334,13 +334,23 @@ pmap_bootstrap(vm_offset_t ekva) /* * Calculate the size of kernel virtual memory, and the size and mask - * for the kernel TSB. + * for the kernel TSB based on the phsyical memory size but limited + * by letting the kernel TSB take up no more than half of the dTLB + * slots available for locked entries. */ virtsz = roundup(physsz, PAGE_SIZE_4M << (PAGE_SHIFT - TTE_SHIFT)); + virtsz = MIN(virtsz, + (dtlb_slots / 2 * PAGE_SIZE_4M) << (PAGE_SHIFT - TTE_SHIFT)); vm_max_kernel_address = VM_MIN_KERNEL_ADDRESS + virtsz; tsb_kernel_size = virtsz >> (PAGE_SHIFT - TTE_SHIFT); tsb_kernel_mask = (tsb_kernel_size >> TTE_SHIFT) - 1; + if (kernel_tlb_slots + PCPU_PAGES + tsb_kernel_size / PAGE_SIZE_4M + + 1 /* PROM page */ + 1 /* spare */ > dtlb_slots) + panic("pmap_bootstrap: insufficient dTLB entries"); + if (kernel_tlb_slots + 1 /* PROM page */ + 1 /* spare */ > itlb_slots) + panic("pmap_bootstrap: insufficient iTLB entries"); + /* * Allocate the kernel TSB and lock it in the TLB. */ From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 20:03:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E363F1065674; Thu, 1 Jan 2009 20:03:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D0CC18FC12; Thu, 1 Jan 2009 20:03:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n01K31PS077803; Thu, 1 Jan 2009 20:03:01 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n01K313p077802; Thu, 1 Jan 2009 20:03:01 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901012003.n01K313p077802@svn.freebsd.org> From: Robert Watson Date: Thu, 1 Jan 2009 20:03:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186683 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 20:03:02 -0000 Author: rwatson Date: Thu Jan 1 20:03:01 2009 New Revision: 186683 URL: http://svn.freebsd.org/changeset/base/186683 Log: Temporary workaround for the limitations of the mbuf flowid field: zero the field in the mbuf constructors, since otherwise we have no way to tell if they are valid. In the future, Kip has plans to add a flag specifically to indicate validity, which is the preferred model. Modified: head/sys/kern/kern_mbuf.c Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Thu Jan 1 14:01:21 2009 (r186682) +++ head/sys/kern/kern_mbuf.c Thu Jan 1 20:03:01 2009 (r186683) @@ -420,6 +420,7 @@ mb_ctor_mbuf(void *mem, int size, void * m->m_pkthdr.csum_data = 0; m->m_pkthdr.tso_segsz = 0; m->m_pkthdr.ether_vtag = 0; + m->m_pkthdr.flowid = 0; SLIST_INIT(&m->m_pkthdr.tags); #ifdef MAC /* If the label init fails, fail the alloc */ @@ -644,6 +645,7 @@ mb_ctor_pack(void *mem, int size, void * m->m_pkthdr.csum_data = 0; m->m_pkthdr.tso_segsz = 0; m->m_pkthdr.ether_vtag = 0; + m->m_pkthdr.flowid = 0; SLIST_INIT(&m->m_pkthdr.tags); #ifdef MAC /* If the label init fails, fail the alloc */ From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 20:03:23 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 216911065745; Thu, 1 Jan 2009 20:03:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04AD78FC0C; Thu, 1 Jan 2009 20:03:23 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n01K3M7i077847; Thu, 1 Jan 2009 20:03:22 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n01K3MFm077846; Thu, 1 Jan 2009 20:03:22 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901012003.n01K3MFm077846@svn.freebsd.org> From: Robert Watson Date: Thu, 1 Jan 2009 20:03:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186684 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 20:03:24 -0000 Author: rwatson Date: Thu Jan 1 20:03:22 2009 New Revision: 186684 URL: http://svn.freebsd.org/changeset/base/186684 Log: White space and comment tweaks. MFC after: 3 weeks Modified: head/sys/kern/uipc_usrreq.c Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Thu Jan 1 20:03:01 2009 (r186683) +++ head/sys/kern/uipc_usrreq.c Thu Jan 1 20:03:22 2009 (r186684) @@ -1229,14 +1229,14 @@ unp_connect(struct socket *so, struct so unp3->unp_addr = (struct sockaddr_un *) sa; sa = NULL; } + /* - * unp_peercred management: - * * The connecter's (client's) credentials are copied from its * process structure at the time of connect() (which is now). */ cru2x(td->td_ucred, &unp3->unp_peercred); unp3->unp_flags |= UNP_HAVEPC; + /* * The receiver's (server's) credentials are copied from the * unp_peercred member of socket on which the former called From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 22:04:44 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D1761065672; Thu, 1 Jan 2009 22:04:44 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw0.york.ac.uk (mail-gw0.york.ac.uk [144.32.128.245]) by mx1.freebsd.org (Postfix) with ESMTP id 0BDFC8FC16; Thu, 1 Jan 2009 22:04:43 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from mail-gw6.york.ac.uk (mail-gw6.york.ac.uk [144.32.129.26]) by mail-gw0.york.ac.uk (8.13.6/8.13.6) with ESMTP id n01M4db6008085; Thu, 1 Jan 2009 22:04:39 GMT Received: from ury.york.ac.uk ([144.32.108.81]) by mail-gw6.york.ac.uk with esmtps (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1LIVeh-0000fO-SM; Thu, 01 Jan 2009 22:04:39 +0000 Received: from ury.york.ac.uk (localhost.york.ac.uk [127.0.0.1]) by ury.york.ac.uk (8.14.3/8.14.3) with ESMTP id n01M4dk4005371; Thu, 1 Jan 2009 22:04:39 GMT (envelope-from gavin@FreeBSD.org) Received: from localhost (gavin@localhost) by ury.york.ac.uk (8.14.3/8.14.3/Submit) with ESMTP id n01M4cV1005368; Thu, 1 Jan 2009 22:04:39 GMT (envelope-from gavin@FreeBSD.org) X-Authentication-Warning: ury.york.ac.uk: gavin owned process doing -bs Date: Thu, 1 Jan 2009 22:04:38 +0000 (GMT) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Doug Barton In-Reply-To: <200901011055.n01AtQaN052763@svn.freebsd.org> Message-ID: <20090101215930.P70386@ury.york.ac.uk> References: <200901011055.n01AtQaN052763@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@freebsd.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186677 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 22:04:45 -0000 On Thu, 1 Jan 2009, Doug Barton wrote: > Given that this is a situation that comes up very infrequently (usually > only for a major version upgrade) This is no longer true: a side effect of having SVN exported to CVS is that every time a branch is forked, the CVS ID is bumped, and as a result is different between 7.0 and 7.1 even if the file itself isn't changed. As long as this is handled with -U, however, I'm not sure I see the need for special handling. I'd love to see the -U otion as default, and a pre-populated mtree database for it shipped with the releases, however. This would go a long way towards making upgrading more user-friendly. Gavin From owner-svn-src-head@FreeBSD.ORG Thu Jan 1 23:22:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D28641065670; Thu, 1 Jan 2009 23:22:01 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BEEA28FC18; Thu, 1 Jan 2009 23:22:01 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n01NM1dA081519; Thu, 1 Jan 2009 23:22:01 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n01NM1rd081518; Thu, 1 Jan 2009 23:22:01 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901012322.n01NM1rd081518@svn.freebsd.org> From: Ed Schouten Date: Thu, 1 Jan 2009 23:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186687 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2009 23:22:02 -0000 Author: ed Date: Thu Jan 1 23:22:01 2009 New Revision: 186687 URL: http://svn.freebsd.org/changeset/base/186687 Log: Remove an unneeded assertion in libteken. The cursor is only inside the scrolling region when we are in origin mode. In that case, it should use originreg instead of scrollreg. It is completely valid to place the cursor outside the scrolling region. Modified: head/sys/dev/syscons/teken/teken_subr.h Modified: head/sys/dev/syscons/teken/teken_subr.h ============================================================================== --- head/sys/dev/syscons/teken/teken_subr.h Thu Jan 1 22:11:44 2009 (r186686) +++ head/sys/dev/syscons/teken/teken_subr.h Thu Jan 1 23:22:01 2009 (r186687) @@ -256,7 +256,6 @@ static void teken_subr_cursor_down(teken_t *t, unsigned int nrows) { - teken_assert(t->t_cursor.tp_row < t->t_scrollreg.ts_end); if (t->t_cursor.tp_row + nrows >= t->t_scrollreg.ts_end) t->t_cursor.tp_row = t->t_scrollreg.ts_end - 1; else From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 00:02:15 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FD6E106566B; Fri, 2 Jan 2009 00:02:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CF828FC08; Fri, 2 Jan 2009 00:02:15 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0202ESI082303; Fri, 2 Jan 2009 00:02:14 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0202Ene082302; Fri, 2 Jan 2009 00:02:14 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901020002.n0202Ene082302@svn.freebsd.org> From: Doug Barton Date: Fri, 2 Jan 2009 00:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186688 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 00:02:15 -0000 Author: dougb Date: Fri Jan 2 00:02:14 2009 New Revision: 186688 URL: http://svn.freebsd.org/changeset/base/186688 Log: For IGNORE_FILES delete the version in the TEMPROOT, not the base. Submitted by: clemens fischer Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Thu Jan 1 23:22:01 2009 (r186687) +++ head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 2 00:02:14 2009 (r186688) @@ -644,7 +644,7 @@ case "${RERUN}" in # Avoid comparing the following user specified files for file in ${IGNORE_FILES}; do - test -e ${file} && unlink ${file} + test -e ${TEMPROOT}/${file} && unlink ${TEMPROOT}/${file} done ;; # End of the "RERUN" test esac From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 00:24:50 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 275DA1065674; Fri, 2 Jan 2009 00:24:50 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id D963D8FC18; Fri, 2 Jan 2009 00:24:49 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n020Okun023565 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Jan 2009 16:24:49 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <495D5ECE.6000500@freebsd.org> Date: Thu, 01 Jan 2009 16:24:46 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Doug Barton References: <200901011141.n01BfDqj054333@svn.freebsd.org> In-Reply-To: <200901011141.n01BfDqj054333@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 00:24:50 -0000 Doug Barton wrote: > 2. Check for the deprecated 'nodev' option in /etc/fstab [3] > mergemaster now prints: grep: /data/freebsd/roots/gateworks/etc/fstab: No such file or directory I suspect it's the above change. Unfortunately you committed a bunch of unrelated changes en masse so I am guessing. Sam From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 00:28:52 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C7FB106564A; Fri, 2 Jan 2009 00:28:52 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 4C27F8FC14; Fri, 2 Jan 2009 00:28:52 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n020SpKY023606 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Jan 2009 16:28:52 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <495D5FC3.6000109@freebsd.org> Date: Thu, 01 Jan 2009 16:28:51 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Doug Barton References: <200901011141.n01BfDqj054333@svn.freebsd.org> In-Reply-To: <200901011141.n01BfDqj054333@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 00:28:53 -0000 Doug Barton wrote: > 1. Switch to using the top level (e.g., /usr/src) Makefile, and specify > that we should use the *.mk files from the source directory instead of > the installed versions. [1][2] This allows easier cross builds and > simplifies (or in some cases permits) upgrading. > I believe you changed the meaning of the -m flag so it now requires a pathname to the src tree and not src/etc. This breaks existing usage. In the PR I filed there was a follow-on patch from Bjoern that amended my suggestion to instead add a -M option to set the source tree. I thought that was an improvement over my hack. In lieu of that you might want to examine the pathname supplied to -m to try to provide backwards compatibility by stripping any /etc suffix on the path. Sam From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 00:31:27 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BC801065672; Fri, 2 Jan 2009 00:31:27 +0000 (UTC) (envelope-from rik@inse.ru) Received: from mail.inse.ru (mail.inse.ru [144.206.128.1]) by mx1.freebsd.org (Postfix) with ESMTP id E25638FC14; Fri, 2 Jan 2009 00:31:26 +0000 (UTC) (envelope-from rik@inse.ru) Received: from www.inse.ru (www.inse.ru [144.206.128.1]) by mail.inse.ru (Postfix) with ESMTPSA id 94D1B33C51; Fri, 2 Jan 2009 03:31:25 +0300 (MSK) Message-ID: <495D6085.5070206@localhost.inse.ru> Date: Fri, 02 Jan 2009 03:32:05 +0300 From: Roman Kurakin User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: Sam Leffler References: <200901011141.n01BfDqj054333@svn.freebsd.org> <495D5ECE.6000500@freebsd.org> In-Reply-To: <495D5ECE.6000500@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Doug Barton , src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 00:31:27 -0000 Sam Leffler wrote: > Doug Barton wrote: >> 2. Check for the deprecated 'nodev' option in /etc/fstab [3] >> > > mergemaster now prints: > > grep: /data/freebsd/roots/gateworks/etc/fstab: No such file or directory > > I suspect it's the above change. Unfortunately you committed a bunch > of unrelated changes en masse so I am guessing. I guess this is this one part of the patch: +if grep -q nodev ${DESTDIR}/etc/fstab; then + echo '' + echo "*** You have the deprecated 'nodev' option in ${DESTDIR}/etc/fstab." + echo " This can prevent your system from mounting the filesystem on reboot." + echo " Please update your fstab before continuing." + echo " See fstab(5) for more information." + echo '' + exit 1 fi rik > > Sam > From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 00:38:00 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10BAB106564A; Fri, 2 Jan 2009 00:38:00 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F1EF28FC16; Fri, 2 Jan 2009 00:37:59 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n020bx72082925; Fri, 2 Jan 2009 00:37:59 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n020bxZG082924; Fri, 2 Jan 2009 00:37:59 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901020037.n020bxZG082924@svn.freebsd.org> From: Doug Barton Date: Fri, 2 Jan 2009 00:37:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186689 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 00:38:00 -0000 Author: dougb Date: Fri Jan 2 00:37:59 2009 New Revision: 186689 URL: http://svn.freebsd.org/changeset/base/186689 Log: Only check for 'nodev' in fstab if that file exists Submitted by: sam Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 2 00:02:14 2009 (r186688) +++ head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 2 00:37:59 2009 (r186689) @@ -353,14 +353,16 @@ case "${AUTO_UPGRADE}" in ;; esac -if grep -q nodev ${DESTDIR}/etc/fstab; then - echo '' - echo "*** You have the deprecated 'nodev' option in ${DESTDIR}/etc/fstab." - echo " This can prevent your system from mounting the filesystem on reboot." - echo " Please update your fstab before continuing." - echo " See fstab(5) for more information." - echo '' - exit 1 +if [ -e "${DESTDIR}/etc/fstab" ]; then + if grep -q nodev ${DESTDIR}/etc/fstab; then + echo '' + echo "*** You have the deprecated 'nodev' option in ${DESTDIR}/etc/fstab." + echo " This can prevent the filesystem from being mounted on reboot." + echo " Please update your fstab before continuing." + echo " See fstab(5) for more information." + echo '' + exit 1 + fi fi echo '' From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 00:39:25 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8596A1065673 for ; Fri, 2 Jan 2009 00:39:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 13D5E8FC1C for ; Fri, 2 Jan 2009 00:39:24 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 31415 invoked by uid 399); 2 Jan 2009 00:39:24 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Jan 2009 00:39:24 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <495D623A.9010800@FreeBSD.org> Date: Thu, 01 Jan 2009 16:39:22 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.18 (X11/20081128) MIME-Version: 1.0 To: Sam Leffler References: <200901011141.n01BfDqj054333@svn.freebsd.org> <495D5ECE.6000500@freebsd.org> In-Reply-To: <495D5ECE.6000500@freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 00:39:25 -0000 Sam Leffler wrote: > Doug Barton wrote: >> 2. Check for the deprecated 'nodev' option in /etc/fstab [3] >> > > mergemaster now prints: > > grep: /data/freebsd/roots/gateworks/etc/fstab: No such file or directory Fixed, thanks. > I suspect it's the above change. Unfortunately you committed a bunch of > unrelated changes en masse so I am guessing. Yes, oddly enough yours was not the only outstanding request. :) Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 00:41:39 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 269B1106567C for ; Fri, 2 Jan 2009 00:41:39 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id B07498FC54 for ; Fri, 2 Jan 2009 00:41:38 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 1318 invoked by uid 399); 2 Jan 2009 00:41:38 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Jan 2009 00:41:38 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <495D62C0.7090306@FreeBSD.org> Date: Thu, 01 Jan 2009 16:41:36 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.18 (X11/20081128) MIME-Version: 1.0 To: Sam Leffler References: <200901011141.n01BfDqj054333@svn.freebsd.org> <495D5FC3.6000109@freebsd.org> In-Reply-To: <495D5FC3.6000109@freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 00:41:39 -0000 Sam Leffler wrote: > Doug Barton wrote: >> 1. Switch to using the top level (e.g., /usr/src) Makefile, and specify >> that we should use the *.mk files from the source directory instead of >> the installed versions. [1][2] This allows easier cross builds and >> simplifies (or in some cases permits) upgrading. >> > > I believe you changed the meaning of the -m flag so it now requires a > pathname to the src tree and not src/etc. This breaks existing usage. > In the PR I filed there was a follow-on patch from Bjoern that amended > my suggestion to instead add a -M option to set the source tree. I > thought that was an improvement over my hack. In lieu of that you might > want to examine the pathname supplied to -m to try to provide backwards > compatibility by stripping any /etc suffix on the path. The version in bin/96528 from ru had a better fix for this issue, but thanks for thinking of it. :) Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 00:45:43 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E5F9106566C; Fri, 2 Jan 2009 00:45:43 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 2F3028FC19; Fri, 2 Jan 2009 00:45:43 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n020jgDg023751 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Jan 2009 16:45:42 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <495D63B6.3020106@freebsd.org> Date: Thu, 01 Jan 2009 16:45:42 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Doug Barton References: <200901011141.n01BfDqj054333@svn.freebsd.org> <495D5FC3.6000109@freebsd.org> <495D62C0.7090306@FreeBSD.org> In-Reply-To: <495D62C0.7090306@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 00:45:43 -0000 Doug Barton wrote: > Sam Leffler wrote: > >> Doug Barton wrote: >> >>> 1. Switch to using the top level (e.g., /usr/src) Makefile, and specify >>> that we should use the *.mk files from the source directory instead of >>> the installed versions. [1][2] This allows easier cross builds and >>> simplifies (or in some cases permits) upgrading. >>> >>> >> I believe you changed the meaning of the -m flag so it now requires a >> pathname to the src tree and not src/etc. This breaks existing usage. >> In the PR I filed there was a follow-on patch from Bjoern that amended >> my suggestion to instead add a -M option to set the source tree. I >> thought that was an improvement over my hack. In lieu of that you might >> want to examine the pathname supplied to -m to try to provide backwards >> compatibility by stripping any /etc suffix on the path. >> > > The version in bin/96528 from ru had a better fix for this issue, but > thanks for thinking of it. :) > > That's nice to know. Unfortunately what's in HEAD doesn't seem to work for my cross-install setup. Did you test using the recipe in my PR? I am debugging; could be a local problem. Sam From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 00:58:16 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 309C9106566B; Fri, 2 Jan 2009 00:58:16 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.208.78.105]) by mx1.freebsd.org (Postfix) with ESMTP id EB6038FC16; Fri, 2 Jan 2009 00:58:15 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.3/8.14.3) with ESMTP id n020wFYU039256; Thu, 1 Jan 2009 16:58:15 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.3/8.14.3/Submit) id n020wFJH039255; Thu, 1 Jan 2009 16:58:15 -0800 (PST) (envelope-from sgk) Date: Thu, 1 Jan 2009 16:58:15 -0800 From: Steve Kargl To: Doug Barton Message-ID: <20090102005815.GA39239@troutmask.apl.washington.edu> References: <200901011141.n01BfDqj054333@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200901011141.n01BfDqj054333@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 00:58:16 -0000 On Thu, Jan 01, 2009 at 11:41:13AM +0000, Doug Barton wrote: > Author: dougb > Date: Thu Jan 1 11:41:13 2009 > New Revision: 186678 > URL: http://svn.freebsd.org/changeset/base/186678 > > Log: > Maintenance and updates > ======================= > 1. Various improvements to the mtree (-U) feature: REMOVE:root[208] mergemaster -iU : not found ? mergemaster continues as expected after printing the above. -- Steve From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 01:34:51 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E99291065673 for ; Fri, 2 Jan 2009 01:34:51 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 3E5FB8FC17 for ; Fri, 2 Jan 2009 01:34:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 18862 invoked by uid 399); 2 Jan 2009 01:34:50 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Jan 2009 01:34:50 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <495D6F39.7030504@FreeBSD.org> Date: Thu, 01 Jan 2009 17:34:49 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.18 (X11/20081128) MIME-Version: 1.0 To: Steve Kargl References: <200901011141.n01BfDqj054333@svn.freebsd.org> <20090102005815.GA39239@troutmask.apl.washington.edu> In-Reply-To: <20090102005815.GA39239@troutmask.apl.washington.edu> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 01:34:52 -0000 Steve Kargl wrote: > On Thu, Jan 01, 2009 at 11:41:13AM +0000, Doug Barton wrote: >> Author: dougb >> Date: Thu Jan 1 11:41:13 2009 >> New Revision: 186678 >> URL: http://svn.freebsd.org/changeset/base/186678 >> >> Log: >> Maintenance and updates >> ======================= >> 1. Various improvements to the mtree (-U) feature: > > REMOVE:root[208] mergemaster -iU > > : not found > > ? I can't reproduce this. Can you please add -x to the shebang line in the script then send me the relevant output? If you have an rc file for mergemaster please include that too. > mergemaster continues as expected after printing the above. That's good news at least. :) Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 03:10:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A023C106564A; Fri, 2 Jan 2009 03:10:56 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8BFB08FC08; Fri, 2 Jan 2009 03:10:56 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n023Au6h086056; Fri, 2 Jan 2009 03:10:56 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n023Au27086047; Fri, 2 Jan 2009 03:10:56 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901020310.n023Au27086047@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 2 Jan 2009 03:10:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186691 - in head/contrib/file: . Magdir tests X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 03:10:57 -0000 Author: obrien Date: Fri Jan 2 03:10:55 2009 New Revision: 186691 URL: http://svn.freebsd.org/changeset/base/186691 Log: Record that base/vendor/file/dist@186675 was merged. Merge base/vendor/file/dist@186675@186690, bringing FILE 4.26 to 8-CURRENT. Added: head/contrib/file/AUTHORS - copied unchanged from r186690, vendor/file/dist/AUTHORS head/contrib/file/COPYING - copied unchanged from r186690, vendor/file/dist/COPYING head/contrib/file/INSTALL - copied unchanged from r186690, vendor/file/dist/INSTALL head/contrib/file/Magdir/clarion - copied unchanged from r186690, vendor/file/dist/Magdir/clarion head/contrib/file/Magdir/erlang - copied unchanged from r186690, vendor/file/dist/Magdir/erlang head/contrib/file/Magdir/gnome-keyring - copied unchanged from r186690, vendor/file/dist/Magdir/gnome-keyring head/contrib/file/Magdir/gnumeric - copied unchanged from r186690, vendor/file/dist/Magdir/gnumeric head/contrib/file/Magdir/graphviz - copied unchanged from r186690, vendor/file/dist/Magdir/graphviz head/contrib/file/Magdir/inform - copied unchanged from r186690, vendor/file/dist/Magdir/inform head/contrib/file/Magdir/kde - copied unchanged from r186690, vendor/file/dist/Magdir/kde head/contrib/file/Magdir/llvm - copied unchanged from r186690, vendor/file/dist/Magdir/llvm head/contrib/file/Magdir/lua - copied unchanged from r186690, vendor/file/dist/Magdir/lua head/contrib/file/Magdir/luks - copied unchanged from r186690, vendor/file/dist/Magdir/luks head/contrib/file/Magdir/mathcad - copied unchanged from r186690, vendor/file/dist/Magdir/mathcad head/contrib/file/Magdir/mercurial - copied unchanged from r186690, vendor/file/dist/Magdir/mercurial head/contrib/file/Magdir/mozilla - copied unchanged from r186690, vendor/file/dist/Magdir/mozilla head/contrib/file/Magdir/netware - copied unchanged from r186690, vendor/file/dist/Magdir/netware head/contrib/file/Magdir/ole2compounddocs - copied unchanged from r186690, vendor/file/dist/Magdir/ole2compounddocs head/contrib/file/Magdir/ruby - copied unchanged from r186690, vendor/file/dist/Magdir/ruby head/contrib/file/Magdir/securitycerts - copied unchanged from r186690, vendor/file/dist/Magdir/securitycerts head/contrib/file/Magdir/warc - copied unchanged from r186690, vendor/file/dist/Magdir/warc head/contrib/file/Magdir/weak - copied unchanged from r186690, vendor/file/dist/Magdir/weak head/contrib/file/Magdir/windows - copied unchanged from r186690, vendor/file/dist/Magdir/windows head/contrib/file/Magdir/xilinx - copied unchanged from r186690, vendor/file/dist/Magdir/xilinx head/contrib/file/NEWS - copied unchanged from r186690, vendor/file/dist/NEWS head/contrib/file/TODO - copied unchanged from r186690, vendor/file/dist/TODO head/contrib/file/asprintf.c - copied unchanged from r186690, vendor/file/dist/asprintf.c head/contrib/file/compile - copied unchanged from r186690, vendor/file/dist/compile head/contrib/file/config.guess - copied unchanged from r186690, vendor/file/dist/config.guess head/contrib/file/config.sub - copied unchanged from r186690, vendor/file/dist/config.sub head/contrib/file/configure.ac - copied unchanged from r186690, vendor/file/dist/configure.ac head/contrib/file/elfclass.h - copied unchanged from r186690, vendor/file/dist/elfclass.h head/contrib/file/getopt_long.c - copied unchanged from r186690, vendor/file/dist/getopt_long.c head/contrib/file/mygetopt.h - copied unchanged from r186690, vendor/file/dist/mygetopt.h head/contrib/file/tests/ - copied from r186690, vendor/file/dist/tests/ head/contrib/file/vasprintf.c - copied unchanged from r186690, vendor/file/dist/vasprintf.c Replaced: head/contrib/file/FREEBSD-upgrade - copied unchanged from r186690, vendor/file/dist/FREEBSD-upgrade head/contrib/file/magic2mime Deleted: head/contrib/file/LEGAL.NOTICE head/contrib/file/Makefile.std head/contrib/file/PORTING head/contrib/file/configure.in head/contrib/file/magic.mime head/contrib/file/mkinstalldirs head/contrib/file/test.c Modified: head/contrib/file/ (props changed) head/contrib/file/ChangeLog head/contrib/file/MAINT head/contrib/file/Magdir/adventure head/contrib/file/Magdir/animation head/contrib/file/Magdir/apple head/contrib/file/Magdir/archive head/contrib/file/Magdir/audio head/contrib/file/Magdir/c-lang head/contrib/file/Magdir/c64 head/contrib/file/Magdir/cafebabe head/contrib/file/Magdir/cddb head/contrib/file/Magdir/commands head/contrib/file/Magdir/compress head/contrib/file/Magdir/console head/contrib/file/Magdir/cracklib head/contrib/file/Magdir/ctags head/contrib/file/Magdir/database head/contrib/file/Magdir/diff head/contrib/file/Magdir/dump head/contrib/file/Magdir/elf head/contrib/file/Magdir/filesystems head/contrib/file/Magdir/flash head/contrib/file/Magdir/fonts head/contrib/file/Magdir/fortran head/contrib/file/Magdir/frame head/contrib/file/Magdir/freebsd head/contrib/file/Magdir/fsav head/contrib/file/Magdir/games head/contrib/file/Magdir/gimp head/contrib/file/Magdir/gnu head/contrib/file/Magdir/hp head/contrib/file/Magdir/iff head/contrib/file/Magdir/images head/contrib/file/Magdir/java head/contrib/file/Magdir/jpeg head/contrib/file/Magdir/lex head/contrib/file/Magdir/linux head/contrib/file/Magdir/lisp head/contrib/file/Magdir/macintosh head/contrib/file/Magdir/mail.news head/contrib/file/Magdir/mathematica head/contrib/file/Magdir/misctools head/contrib/file/Magdir/msdos head/contrib/file/Magdir/mup head/contrib/file/Magdir/os2 head/contrib/file/Magdir/palm head/contrib/file/Magdir/pdf head/contrib/file/Magdir/perl head/contrib/file/Magdir/pgp head/contrib/file/Magdir/pkgadd head/contrib/file/Magdir/printer head/contrib/file/Magdir/psion head/contrib/file/Magdir/revision head/contrib/file/Magdir/riff head/contrib/file/Magdir/rpm head/contrib/file/Magdir/rtf head/contrib/file/Magdir/sc head/contrib/file/Magdir/scientific head/contrib/file/Magdir/sgi head/contrib/file/Magdir/sgml head/contrib/file/Magdir/sharc head/contrib/file/Magdir/sketch head/contrib/file/Magdir/softquad head/contrib/file/Magdir/spectrum head/contrib/file/Magdir/tex head/contrib/file/Magdir/troff head/contrib/file/Magdir/unicode head/contrib/file/Magdir/uuencode head/contrib/file/Magdir/varied.script head/contrib/file/Magdir/vorbis head/contrib/file/Magdir/wordprocessors head/contrib/file/Makefile.am head/contrib/file/Makefile.in head/contrib/file/README head/contrib/file/acinclude.m4 head/contrib/file/aclocal.m4 head/contrib/file/apprentice.c head/contrib/file/ascmagic.c head/contrib/file/compress.c head/contrib/file/config.h.in head/contrib/file/configure head/contrib/file/file.c head/contrib/file/file.h head/contrib/file/file.man head/contrib/file/fsmagic.c head/contrib/file/funcs.c head/contrib/file/is_tar.c head/contrib/file/libmagic.man head/contrib/file/magic.c head/contrib/file/magic.h head/contrib/file/magic.man head/contrib/file/names.h head/contrib/file/patchlevel.h head/contrib/file/print.c head/contrib/file/readelf.c head/contrib/file/readelf.h head/contrib/file/softmagic.c head/contrib/file/tar.h Copied: head/contrib/file/AUTHORS (from r186690, vendor/file/dist/AUTHORS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/file/AUTHORS Fri Jan 2 03:10:55 2009 (r186691, copy of r186690, vendor/file/dist/AUTHORS) @@ -0,0 +1 @@ +See COPYING. \ No newline at end of file Copied: head/contrib/file/COPYING (from r186690, vendor/file/dist/COPYING) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/file/COPYING Fri Jan 2 03:10:55 2009 (r186691, copy of r186690, vendor/file/dist/COPYING) @@ -0,0 +1,29 @@ +$File: COPYING,v 1.1 2008/02/05 19:08:11 christos Exp $ +Copyright (c) Ian F. Darwin 1986, 1987, 1989, 1990, 1991, 1992, 1994, 1995. +Software written by Ian F. Darwin and others; +maintained 1994- Christos Zoulas. + +This software is not subject to any export provision of the United States +Department of Commerce, and may be exported to any country or planet. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice immediately at the beginning of the file, without modification, + this list of conditions, and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. Modified: head/contrib/file/ChangeLog ============================================================================== --- head/contrib/file/ChangeLog Fri Jan 2 02:57:16 2009 (r186690) +++ head/contrib/file/ChangeLog Fri Jan 2 03:10:55 2009 (r186691) @@ -1,4 +1,135 @@ -2007-12-28 15:06 Christos Zoulas +2008-08-30 12:54 Christos Zoulas + + * Don't eat trailing \n in magic enties. + + * Cast defines to allow compilation using a c++ compiler. + +2008-07-26 00:59 Reuben Thomas + + * Add MIME types for special files. + + * Use access to give more accurate information for files that + can't be opened. + + * Add a TODO list. + +2008-07-02 11:15 Christos Zoulas + + * add !:strength op to adjust magic strength (experimental) + +2008-06-16 21:41 Reuben Thomas + + * Fix automake error in configure.ac. + + * Add MIME type for Psion Sketch files. + +2008-06-05 08:59 Christos Zoulas + + * Don't print warnings about bad namesize in stripped + binaries with PT_NOTE is still there, and the actual + note is gone (Jakub Jelinek) + +2008-05-28 15:12 Robert Byrnes + + * magic/Magdir/elf: + Note invalid byte order for little-endian SPARC32PLUS. + Add SPARC V9 vendor extensions and memory model. + + * src/elfclass.h: + Pass target machine to doshn (for Solaris hardware capabilities). + + * src/readelf.c (doshn): + Add support for Solaris hardware/software capabilities. + + * src/readelf.h: + Ditto. + + * src/vasprintf.c (dispatch): + Add support for ll modifier. + +2008-05-16 10:25 Christos Zoulas + + * Fix compiler warnings. + + * remove stray printf, and fix a vprintf bug. (Martin Dorey) + +2008-05-06 00:13 Robert Byrnes + + * src/Makefile.am: + Ensure that getopt_long and [v]asprintf are included in libmagic, + as needed. + + Remove unnecessary EXTRA_DIST. + + * src/Makefile.in: + Rerun automake. + + * src/vasprintf.c (dispatch): + Fix variable precision bug: be sure to step past '*'. + + * src/vasprintf.c (core): + Remove unreachable code. + + * src/apprentice.c (set_test_type): + Add cast to avoid compiler warning. + +2008-04-22 23:45 Christos Zoulas + + * Add magic submission guidelines (Abel Cheung) + + * split msdos and windows magic (Abel Cheung) + +2008-04-04 11:00 Christos Zoulas + + * >= <= is not supported, so fix the magic and warn about it. + reported by: Thien-Thi Nguyen + +2008-03-27 16:16 Robert Byrnes + + * src/readelf.c (donote): + ELF core file command name/line bug fixes and enhancements: + + Try larger offsets first to avoid false matches + from earlier data that happen to look like strings; + this primarily affected SunOS 5.x 32-bit Intel core files. + + Add support for command line (instead of just short name) + for SunOS 5.x. + + Add information about NT_PSINFO for SunOS 5.x. + + Only trim whitespace from end of command line. + +2007-02-11 01:36 Reuben Thomas + + * Change strength of ! from MULT to 0, as it matches almost + anything (Reuben Thomas) + + * Debian fixes (Reuben Thomas) + +2007-02-11 00:17 Reuben Thomas + + * Clarify UTF-8 BOM message (Reuben Thomas) + + * Add HTML comment to token list in names.h + +2007-02-04 15:50 Christos Zoulas + + * Debian fixes (Reuben Thomas) + +2007-02-04 11:31 Christos Zoulas + + * !:mime annotations in magic files (Reuben Thomas) + +2007-01-29 15:35 Christos Zoulas + + * zero out utime/utimes structs (Gavin Atkinson) + +2007-01-26 13:45 Christos Zoulas + + * reduce writable data from Diego "Flameeyes" Petten + +2007-12-28 15:06 Christos Zoulas * strtof detection @@ -6,7 +137,7 @@ * better mismatch version message -2007-12-27 11:35 Christos Zoulas +2007-12-27 11:35 Christos Zoulas * bring back some fixes from OpenBSD @@ -14,46 +145,46 @@ * fix gcc warnings -2007-12-01 19:55 Christos Zoulas +2007-12-01 19:55 Christos Zoulas * make sure we have zlib.h and libz to compile the builtin decompress code -2007-10-28 20:48 Christos Zoulas +2007-10-28 20:48 Christos Zoulas * float and double magic support (Behan Webster) -2007-10-28 20:48 Christos Zoulas +2007-10-28 20:48 Christos Zoulas * Convert fortran to a soft test (Reuben Thomas) -2007-10-23 5:25 Christos Zoulas +2007-10-23 5:25 Christos Zoulas * Add --with-filename, and --no-filename (Reuben Thomas) -2007-10-23 3:59 Christos Zoulas +2007-10-23 3:59 Christos Zoulas * Rest of the mime split (Reuben Thomas) * Make usage message generated from the flags so that they stay consistent (Reuben Thomas) -2007-10-20 3:06 Christos Zoulas +2007-10-20 3:06 Christos Zoulas * typo in comment, missing ifdef QUICK, remove unneeded code (Charles Longeau) -2007-10-17 3:33 Christos Zoulas +2007-10-17 3:33 Christos Zoulas * Fix problem printing -\012 in some entries * Separate magic type and encoding flags (Reuben Thomas) -2007-10-09 3:55 Christos Zoulas +2007-10-09 3:55 Christos Zoulas * configure fix for int64 and strndup (Reuben Thomas) -2007-09-26 4:45 Christos Zoulas +2007-09-26 4:45 Christos Zoulas * Add magic_descriptor() function. @@ -62,7 +193,7 @@ * Don't convert NUL's to spaces in {l,b}estring16 (Daniel Dawson) -2007-08-19 6:30 Christos Zoulas +2007-08-19 6:30 Christos Zoulas * Make mime format consistent so that it can be easily parsed: @@ -79,38 +210,38 @@ This work was done by Reuben Thomas -2007-05-24 10:00 Christos Zoulas +2007-05-24 10:00 Christos Zoulas * Fix another integer overflow (Colin Percival) -2007-03-26 13:58 Christos Zoulas +2007-03-26 13:58 Christos Zoulas * make sure that all of struct magic_set is initialized appropriately (Brett) -2007-03-25 17:44 Christos Zoulas +2007-03-25 17:44 Christos Zoulas * reset left bytes in the buffer (Dmitry V. Levin) * compilation failed with COMPILE_ONLY and ENABLE_CONDITIONALS (Peter Avalos) -2007-03-15 10:51 Christos Zoulas +2007-03-15 10:51 Christos Zoulas * fix fortran and nroff reversed tests (Dmitry V. Levin) * fix exclude option (Dmitry V. Levin) -2007-02-08 17:30 Christos Zoulas +2007-02-08 17:30 Christos Zoulas * fix integer underflow in file_printf which can lead to to exploitable heap overflow (Jean-Sebastien Guay-Lero) -2007-02-05 11:35 Christos Zoulas +2007-02-05 11:35 Christos Zoulas * make socket/pipe reading more robust -2007-01-25 16:01 Christos Zoulas +2007-01-25 16:01 Christos Zoulas * Centralize all the tests in file_buffer. @@ -184,7 +315,7 @@ * make file.c compile with gcc warnings and pass lint -2006-12-11 16:49 Christos Zoulas +2006-12-11 16:49 Christos Zoulas * fix byteswapping issue @@ -193,7 +324,7 @@ * add a few missed cases in the strength routine -2006-12-08 16:32 Christos Zoulas +2006-12-08 16:32 Christos Zoulas * store and print the line number of the magic entry for debugging. @@ -210,7 +341,7 @@ * propagate the error return from match to file_softmagic. -2006-11-25 13:35 Christos Zoulas +2006-11-25 13:35 Christos Zoulas * Don't store the current offset in the magic struct, because it needs to be restored and @@ -221,12 +352,12 @@ print it as an additional separator; print it as the only separator. -2006-11-17 10:51 Christos Zoulas +2006-11-17 10:51 Christos Zoulas * Added a -0 option to print a '\0' separator Etienne Buira -2006-10-31 15:14 Christos Zoulas +2006-10-31 15:14 Christos Zoulas * Check offset before copying (Mike Frysinger) @@ -242,7 +373,7 @@ * use calloc to initialize the ascii buffers (Jos van den Oever) -2006-06-08 11:11 Christos Zoulas +2006-06-08 11:11 Christos Zoulas * QNX fixes (Mike Gorchak) @@ -256,7 +387,7 @@ * Magic format function improvent (Karl Chen) -2006-05-03 11:11 Christos Zoulas +2006-05-03 11:11 Christos Zoulas * Pick up some elf changes and some constant fixes from SUSE @@ -264,13 +395,13 @@ * When keep going, don't print spurious newlines (Radek Vokál) -2006-04-01 12:02 Christos Zoulas +2006-04-01 12:02 Christos Zoulas * Use calloc instead of malloc (Mike Frysinger) * Fix configure script to detect wctypes.h (Mike Frysinger) -2006-03-02 16:06 Christos Zoulas +2006-03-02 16:06 Christos Zoulas * Print empty if the file is (Mike Frysinger) @@ -278,21 +409,21 @@ * Sort magic entries by strength [experimental] -2005-11-29 13:26 Christos Zoulas +2005-11-29 13:26 Christos Zoulas * Use iswprint() to convert the output string. (Bastien Nocera) -2005-10-31 8:54 Christos Zoulas +2005-10-31 8:54 Christos Zoulas * Fix regression where the core info was not completely processed (Radek Vokál) -2005-10-20 11:15 Christos Zoulas +2005-10-20 11:15 Christos Zoulas * Middle Endian magic (Diomidis Spinellis) -2005-10-17 11:15 Christos Zoulas +2005-10-17 11:15 Christos Zoulas * Open with O_BINARY for CYGWIN (Corinna Vinschen) @@ -300,39 +431,39 @@ * Look for note sections in non executables. -2005-09-20 13:33 Christos Zoulas +2005-09-20 13:33 Christos Zoulas * Don't print SVR4 Style in core files multiple times (Radek Vokál) -2005-08-27 04:09 Christos Zoulas +2005-08-27 04:09 Christos Zoulas * Cygwin changes Corinna Vinschen -2005-08-18 09:53 Christos Zoulas +2005-08-18 09:53 Christos Zoulas * Remove erroreous mention of /etc/magic in the file man page This is gentoo bug 101639. (Mike Frysinger) * Cross-compile support and detection (Mike Frysinger) -2005-08-12 10:17 Christos Zoulas +2005-08-12 10:17 Christos Zoulas * Add -h flag and dereference symlinks if POSIXLY_CORRECT is set. -2005-07-29 13:57 Christos Zoulas +2005-07-29 13:57 Christos Zoulas * Avoid search and regex buffer overflows (Kelledin) -2005-07-12 11:48 Christos Zoulas +2005-07-12 11:48 Christos Zoulas * Provide stub implementations for {v,}nsprintf() for older OS's that don't have them. * Change mbstate_t autoconf detection macro from AC_MBSTATE_T to AC_TYPE_MBSTATE_T. -2005-06-25 11:48 Christos Zoulas +2005-06-25 11:48 Christos Zoulas * Dynamically allocate the string buffers and make the default read size 256K. @@ -361,43 +492,43 @@ With CRLF, the line length was not computed correctly, and even lines of length MAXLINELEN - 1 were treated as ``very long''. -2004-12-07 14:15 Christos Zoulas +2004-12-07 14:15 Christos Zoulas * bzip2 needs a lot of input buffer space on some files before it can begin uncompressing. This makes file -z fail on some bz2 files. Fix it by giving it a copy of the file descriptor to read as much as it wants if we - have access to it. + have access to it. -2004-11-24 12:39 Christos Zoulas +2004-11-24 12:39 Christos Zoulas * Stack smash fix, and ELF more conservative reading. Jakub Bogusz -2004-11-20 18:50 Christos Zoulas +2004-11-20 18:50 Christos Zoulas * New FreeBSD version parsing code: Jon Noack - * Hackish support for ucs16 strings + * Hackish support for ucs16 strings -2004-11-13 03:07 Christos Zoulas +2004-11-13 03:07 Christos Zoulas * print the file name and line number in syntax errors. -2004 10-12 10:50 Christos Zoulas +2004 10-12 10:50 Christos Zoulas * Fix stack overwriting on 0 length strings: Tim Waugh Ned Ludd -2004-09-27 11:30 Christos Zoulas +2004-09-27 11:30 Christos Zoulas * Remove 3rd and 4th copyright clause; approved by Ian Darwin. * Fix small memory leaks; caught by: Tamas Sarlos -2004-07-24 16:33 Christos Zoulas +2004-07-24 16:33 Christos Zoulas * magic.mime update Danny Milosavljevic @@ -407,19 +538,19 @@ * errors reading elf magic Jakub Bogusz -2004-04-12 10:55 Christos Zoulas +2004-04-12 10:55 Christos Zoulas * make sure that magic formats match magic types during compilation * fix broken sgi magic file -2004-04-06 20:36 Christos Zoulas +2004-04-06 20:36 Christos Zoulas * detect present of mbstate_t Petter Reinholdtsen * magic fixes -2004-03-22 15:25 Christos Zoulas +2004-03-22 15:25 Christos Zoulas * Lots of mime fixes (Joerg Ostertag) @@ -428,7 +559,7 @@ (Edwin Groothuis) * correct cleanup in all cases; don't just close the file. - (Christos Zoulas) + (Christos Zoulas) * add gettext message catalogue support (Michael Piefel) @@ -446,37 +577,37 @@ or name and description note sizes. Reported by (Mikael Magnusson) -2004-03-09 13:55 Christos Zoulas +2004-03-09 13:55 Christos Zoulas * Fix possible memory leak on error and add missing regfree (Dmitry V. Levin) -2003-12-23 12:12 Christos Zoulas +2003-12-23 12:12 Christos Zoulas * fix -k flag (Maciej W. Rozycki) -2003-11-18 14:10 Christos Zoulas +2003-11-18 14:10 Christos Zoulas * Try to give us much info as possible on corrupt elf files. (Willy Tarreau) * Updated python bindings (Brett Funderburg) -2003-11-11 15:03 Christos Zoulas +2003-11-11 15:03 Christos Zoulas * Include file.h first, because it includes config.h breaks largefile test macros otherwise. (Paul Eggert via Lars Hecking ) -2003-10-14 21:39 Christos Zoulas +2003-10-14 21:39 Christos Zoulas * Python bindings (Brett Funderburg) * Don't lookup past the end of the buffer (Chad Hanson) * Add MAGIC_ERROR and api on magic_errno() -2003-10-08 12:40 Christos Zoulas +2003-10-08 12:40 Christos Zoulas * handle error conditions from compile as fatal (Antti Kantee) @@ -486,32 +617,32 @@ * describe magic file handling (Bryan Henderson) -2003-09-12 15:09 Christos Zoulas +2003-09-12 15:09 Christos Zoulas * update magic files. * remove largefile support from file.h; it breaks things on most OS's -2003-08-10 10:25 Christos Zoulas +2003-08-10 10:25 Christos Zoulas * fix unmapping'ing of mmaped files. -2003-07-10 12:03 Christos Zoulas +2003-07-10 12:03 Christos Zoulas * don't exit with -1 on error; always exit 1 (Marty Leisner) * restore utimes code. -2003-06-10 17:03 Christos Zoulas +2003-06-10 17:03 Christos Zoulas * make sure we don't access uninitialized memory. * pass lint * #ifdef __cplusplus in magic.h -2003-05-25 19:23 Christos Zoulas +2003-05-25 19:23 Christos Zoulas * rename cvs magic file to revision to deal with case insensitive filesystems. -2003-05-23 17:03 Christos Zoulas +2003-05-23 17:03 Christos Zoulas * documentation fixes from Michael Piefel * magic fixes (various) @@ -521,30 +652,30 @@ close files Maciej W. Rozycki +2003-04-21 20:12 Christos Zoulas * fix zsh magic -2003-04-04 16:59 Christos Zoulas +2003-04-04 16:59 Christos Zoulas * fix operand sort order in string. -2003-04-02 17:30 Christos Zoulas +2003-04-02 17:30 Christos Zoulas * cleanup namespace in magic.h -2003-04-02 13:50 Christos Zoulas +2003-04-02 13:50 Christos Zoulas * Magic additions (Alex Ott) * Fix bug that broke VPATH compilation (Peter Breitenlohner) -2003-03-28 16:03 Christos Zoulas +2003-03-28 16:03 Christos Zoulas * remove packed attribute from magic struct. * make the magic struct properly aligned. * bump version number of compiled files to 2. -2003-03-27 13:10 Christos Zoulas +2003-03-27 13:10 Christos Zoulas * separate tar detection and run it before softmagic. * fix reversed symlink test. @@ -552,7 +683,7 @@ * make separator a string instead of a char. * update manual page and sort options. -2003-03-26 11:00 Christos Zoulas +2003-03-26 11:00 Christos Zoulas * Pass lint * make NULL in magic_file mean stdin Copied: head/contrib/file/FREEBSD-upgrade (from r186690, vendor/file/dist/FREEBSD-upgrade) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/file/FREEBSD-upgrade Fri Jan 2 03:10:55 2009 (r186691, copy of r186690, vendor/file/dist/FREEBSD-upgrade) @@ -0,0 +1,30 @@ +# ex:ts=8 +$FreeBSD: vendor/file/dist/contrib/file/FREEBSD-upgrade 169962 2007-05-24 21:59:38Z obrien $ + +Christos Zoulas `file' + originals can be found at: ftp://ftp.astron.com/pub/file/ + +Imported by: + + mv magic/* . + rmdir magic + mv -i src/* . + rm -rf src + mv -i doc/* . + rm -rf doc + rm -rf python + rm -f lt* + rm -f missing depcomp + rm -f config.{guess,sub} + + cvs import -m "Virgin import of Christos Zoulas's FILE 4.21." \ + src/contrib/file ZOULAS file_4_21 + + +Never make local changes to ZOULAS `file'. Christos is very willing to +work with us to meet our FreeBSD needs. Thus submit any desired changes +to him and wait for the next release and vendor +import to get them. + +obrien@NUXI.com +15-Sept-2002 Copied: head/contrib/file/INSTALL (from r186690, vendor/file/dist/INSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/file/INSTALL Fri Jan 2 03:10:55 2009 (r186691, copy of r186690, vendor/file/dist/INSTALL) @@ -0,0 +1,234 @@ +Installation Instructions +************************* + +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006 Free Software Foundation, Inc. + +This file is free documentation; the Free Software Foundation gives +unlimited permission to copy, distribute and modify it. + +Basic Installation +================== + +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, and a +file `config.log' containing compiler output (useful mainly for +debugging `configure'). + + It can also use an optional file (typically called `config.cache' +and enabled with `--cache-file=config.cache' or simply `-C') that saves +the results of its tests to speed up reconfiguring. Caching is +disabled by default to prevent problems with accidental use of stale +cache files. + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If you are using the cache, and at +some point `config.cache' contains results you don't want to keep, you +may remove or edit it. + + The file `configure.ac' (or `configure.in') is used to create +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. + + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + +Some systems require unusual options for compilation or linking that the +`configure' script does not know about. Run `./configure --help' for +details on some of the pertinent environment variables. + + You can give `configure' initial values for configuration parameters +by setting variables in the command line or in the environment. Here +is an example: + + ./configure CC=c99 CFLAGS=-g LIBS=-lposix + + *Note Defining Variables::, for more details. + +Compiling For Multiple Architectures +==================================== + +You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you can use GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. + +Installation Names +================== + +By default, `make install' installs the package's commands under +`/usr/local/bin', include files under `/usr/local/include', etc. You +can specify an installation prefix other than `/usr/local' by giving +`configure' the option `--prefix=PREFIX'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +pass the option `--exec-prefix=PREFIX' to `configure', the package uses +PREFIX as the prefix for installing programs and libraries. +Documentation and other data files still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=DIR' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + +Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + +There may be some features `configure' cannot figure out automatically, +but needs to determine by the type of machine the package will run on. +Usually, assuming the package is built to be run on the _same_ +architectures, `configure' can figure that out, but if it prints a +message saying it cannot guess the machine type, give it the +`--build=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name which has the form: + + CPU-COMPANY-SYSTEM + +where SYSTEM can have one of these forms: + + OS KERNEL-OS + + See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the machine type. + + If you are _building_ compiler tools for cross-compiling, you should +use the option `--target=TYPE' to select the type of system they will +produce code for. + + If you want to _use_ a cross compiler, that generates code for a +platform different from the build platform, you should specify the +"host" platform (i.e., that on which the generated programs will +eventually be run) with `--host=TYPE'. + +Sharing Defaults +================ + +If you want to set default values for `configure' scripts to share, you +can create a site shell script called `config.site' that gives default +values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Defining Variables +================== + +Variables not defined in a site shell script can be set in the +environment passed to `configure'. However, some packages may run +configure again during the build, and the customized values of these +variables may be lost. In order to avoid this problem, you should set +them in the `configure' command line, using `VAR=value'. For example: + + ./configure CC=/usr/local2/bin/gcc + +causes the specified `gcc' to be used as the C compiler (unless it is +overridden in the site shell script). + +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: + + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + +`configure' Invocation +====================== + +`configure' recognizes the following options to control how it operates. + +`--help' +`-h' + Print a summary of the options to `configure', and exit. + +`--version' +`-V' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`--cache-file=FILE' + Enable the cache: use and save the results of the tests in FILE, + traditionally `config.cache'. FILE defaults to `/dev/null' to + disable caching. + +`--config-cache' +`-C' + Alias for `--cache-file=config.cache'. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`configure' also accepts some other, not widely useful, options. Run +`configure --help' for more details. + Modified: head/contrib/file/MAINT ============================================================================== --- head/contrib/file/MAINT Fri Jan 2 02:57:16 2009 (r186690) +++ head/contrib/file/MAINT Fri Jan 2 03:10:55 2009 (r186691) @@ -1,4 +1,4 @@ -$File: MAINT,v 1.9 2007/01/19 21:15:27 christos Exp $ +$File: MAINT,v 1.10 2008/02/05 19:08:11 christos Exp $ Maintenance notes: @@ -41,5 +41,4 @@ ascmagic.c file_ascmagic() readelf.c file_tryelf() "unknown" -Christos Zoulas -christos@astron.com +Christos Zoulas (see README for email address) Modified: head/contrib/file/Magdir/adventure ============================================================================== --- head/contrib/file/Magdir/adventure Fri Jan 2 02:57:16 2009 (r186690) +++ head/contrib/file/Magdir/adventure Fri Jan 2 03:10:55 2009 (r186691) @@ -73,3 +73,13 @@ >10 belong 0x0A0D1A00 >>14 string >\0 %s saved game data +# Danny Milosavljevic +# this are adrift (adventure game standard) game files, extension .taf +# depending on version magic continues with 0x93453E6139FA (V 4.0) +# 0x9445376139FA (V 3.90) +# 0x9445366139FA (V 3.80) +# this is from source (http://www.adrift.org.uk/) and I have some taf +# files, and checked them. +#0 belong 0x3C423FC9 +#>4 belong 0x6A87C2CF Adrift game file +#!:mime application/x-adrift Modified: head/contrib/file/Magdir/animation ============================================================================== --- head/contrib/file/Magdir/animation Fri Jan 2 02:57:16 2009 (r186690) +++ head/contrib/file/Magdir/animation Fri Jan 2 03:10:55 2009 (r186691) @@ -8,57 +8,78 @@ # SGI and Apple formats 0 string MOVI Silicon Graphics movie file +!:mime video/x-sgi-movie 4 string moov Apple QuickTime +!:mime video/quicktime >12 string mvhd \b movie (fast start) >12 string mdra \b URL >12 string cmov \b movie (fast start, compressed header) >12 string rmra \b multiple URLs 4 string mdat Apple QuickTime movie (unoptimized) -4 string wide Apple QuickTime movie (unoptimized) -4 string skip Apple QuickTime movie (modified) -4 string free Apple QuickTime movie (modified) +!:mime video/quicktime +#4 string wide Apple QuickTime movie (unoptimized) +#!:mime video/quicktime +#4 string skip Apple QuickTime movie (modified) +#!:mime video/quicktime +#4 string free Apple QuickTime movie (modified) +#!:mime video/quicktime 4 string idsc Apple QuickTime image (fast start) -4 string idat Apple QuickTime image (unoptimized) +!:mime image/x-quicktime +#4 string idat Apple QuickTime image (unoptimized) +#!:mime image/x-quicktime 4 string pckg Apple QuickTime compressed archive +!:mime application/x-quicktime-player 4 string/B jP JPEG 2000 image +!:mime image/jp2 4 string ftyp ISO Media >8 string isom \b, MPEG v4 system, version 1 +!:mime video/mp4 >8 string iso2 \b, MPEG v4 system, part 12 revision >8 string mp41 \b, MPEG v4 system, version 1 +!:mime video/mp4 >8 string mp42 \b, MPEG v4 system, version 2 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 03:31:46 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 419491065689; Fri, 2 Jan 2009 03:31:46 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FE9C8FC08; Fri, 2 Jan 2009 03:31:46 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n023VjY2086468; Fri, 2 Jan 2009 03:31:45 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n023VjsS086467; Fri, 2 Jan 2009 03:31:45 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901020331.n023VjsS086467@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 2 Jan 2009 03:31:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186692 - head/contrib/file X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 03:31:47 -0000 Author: obrien Date: Fri Jan 2 03:31:45 2009 New Revision: 186692 URL: http://svn.freebsd.org/changeset/base/186692 Log: Add an additional COMPILE_ONLY check. Modified: head/contrib/file/apprentice.c Modified: head/contrib/file/apprentice.c ============================================================================== --- head/contrib/file/apprentice.c Fri Jan 2 03:10:55 2009 (r186691) +++ head/contrib/file/apprentice.c Fri Jan 2 03:31:45 2009 (r186692) @@ -588,9 +588,11 @@ set_test_type(struct magic *mstart, stru break; case FILE_REGEX: case FILE_SEARCH: +#ifndef COMPILE_ONLY /* binary test if pattern is not text */ if (file_looks_utf8(m->value.us, m->vallen, NULL, NULL) <= 0) mstart->flag |= BINTEST; +#endif break; case FILE_DEFAULT: /* can't deduce anything; we shouldn't see this at the From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 03:38:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9595A106566B; Fri, 2 Jan 2009 03:38:21 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 848738FC08; Fri, 2 Jan 2009 03:38:21 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n023cLAr086623; Fri, 2 Jan 2009 03:38:21 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n023cLGZ086622; Fri, 2 Jan 2009 03:38:21 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901020338.n023cLGZ086622@svn.freebsd.org> From: "David E. O'Brien" Date: Fri, 2 Jan 2009 03:38:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186693 - head/lib/libmagic X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 03:38:22 -0000 Author: obrien Date: Fri Jan 2 03:38:21 2009 New Revision: 186693 URL: http://svn.freebsd.org/changeset/base/186693 Log: Don't make the MIME magic any longer. Modified: head/lib/libmagic/Makefile Modified: head/lib/libmagic/Makefile ============================================================================== --- head/lib/libmagic/Makefile Fri Jan 2 03:31:45 2009 (r186692) +++ head/lib/libmagic/Makefile Fri Jan 2 03:38:21 2009 (r186693) @@ -19,9 +19,9 @@ MAGICPATH?= /usr/share/misc CFLAGS+= -DMAGIC='"${MAGICPATH}/magic"' -DHAVE_CONFIG_H CFLAGS+= -I${.CURDIR} -I${CONTRDIR} -CLEANFILES+= magic magic.mgc magic.mime.mgc +CLEANFILES+= magic magic.mgc -FILES= magic magic.mgc ${CONTRDIR}/magic.mime magic.mime.mgc +FILES= magic magic.mgc FILESDIR= ${MAGICPATH} MAGFILES= ${CONTRDIR}/Header\ @@ -34,9 +34,6 @@ magic: ${MAGFILES} magic.mgc: mkmagic magic ./mkmagic magic -magic.mime.mgc: mkmagic magic.mime - ./mkmagic ${CONTRDIR}/magic.mime - CLEANFILES+= mkmagic build-tools: mkmagic mkmagic: apprentice.c funcs.c magic.c print.c From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 06:17:22 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 216AA106564A; Fri, 2 Jan 2009 06:17:22 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id DA4438FC30; Fri, 2 Jan 2009 06:17:21 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.28.129] (d75-157-251-204.bchsia.telus.net [75.157.251.204]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n026HHxd088941 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Jan 2009 22:17:19 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <495DB15B.8040908@FreeBSD.org> Date: Thu, 01 Jan 2009 22:16:59 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Doug Barton References: <200901011055.n01AtQaN052763@svn.freebsd.org> In-Reply-To: <200901011055.n01AtQaN052763@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 06:17:22 -0000 Doug Barton wrote: > Author: dougb > Date: Thu Jan 1 10:55:26 2009 > New Revision: 186677 > URL: http://svn.freebsd.org/changeset/base/186677 > > Log: > Revert 184781, 184804, and 184832 (automatic installation of files > that differ only by VCS Id) for the following reasons: > 1. It was added without my consent, review, or even a heads up Huh? I sent you request for review on 24 October 2008 and did received any reply, so that I went ahead and checked it in due to maintainer timeout. -Maxim -------- Original Message -------- From: - Fri Oct 24 17:15:25 2008 X-Mozilla-Status: 0001 X-Mozilla-Status2: 00800000 X-Mozilla-Keys: Message-ID: <49026515.7080403@sippysoft.com> Date: Fri, 24 Oct 2008 17:15:17 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Doug Barton Subject: mergemaster(8) change for approval Content-Type: text/plain; charset=KOI8-U; format=flowed Content-Transfer-Encoding: 7bit Hi Doug, How are you? Can you please review and hopefully approve the following patch, which makes mergemaster to skip any files that only differ in revision number. This is extremely helpful in tracking stable releases, since there are lot of cases when nothing changes but revision number. The patch is here: http://sobomax.sippysoft.com/~sobomax/mergemaster.diff Thanks in advance! Regards, -- Maksym Sobolyev Sippy Software, Inc. Internet Telephony (VoIP) Experts T/F: +1-646-651-1110 Web: http://www.sippysoft.com From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 06:45:11 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB3B8106564A; Fri, 2 Jan 2009 06:45:11 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id B0BB88FC0C; Fri, 2 Jan 2009 06:45:06 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.28.129] (d75-157-251-204.bchsia.telus.net [75.157.251.204]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n026j49s090351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Jan 2009 22:45:05 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <495DB7DF.5020603@FreeBSD.org> Date: Thu, 01 Jan 2009 22:44:47 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Doug Barton References: <200901011055.n01AtQaN052763@svn.freebsd.org> In-Reply-To: <200901011055.n01AtQaN052763@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 06:45:12 -0000 Doug Barton wrote: > Given that this is a situation that comes up very infrequently (usually > only for a major version upgrade) and can usually be handled simply > enough on a one-off basis, I will once again point out that I think > this is a Bad Idea. I would be willing to consider a better implementation > as an option that is off by default. You are very wrong on this. This situation happens very *frequently* even for updates between minor releases (such as 6.3 to 6.4 and so on). As somebody doing lot of source upgrades frequently I can tell you this for sure. -Maxim From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 06:52:41 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5081B1065670 for ; Fri, 2 Jan 2009 06:52:41 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id DBCEE8FC12 for ; Fri, 2 Jan 2009 06:52:40 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 20743 invoked by uid 399); 2 Jan 2009 06:52:40 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Jan 2009 06:52:40 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <495DB9B6.4030801@FreeBSD.org> Date: Thu, 01 Jan 2009 22:52:38 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.18 (X11/20081128) MIME-Version: 1.0 To: Maxim Sobolev References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> In-Reply-To: <495DB15B.8040908@FreeBSD.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 06:52:41 -0000 Maxim Sobolev wrote: > Doug Barton wrote: >> Author: dougb >> Date: Thu Jan 1 10:55:26 2009 >> New Revision: 186677 >> URL: http://svn.freebsd.org/changeset/base/186677 >> >> Log: >> Revert 184781, 184804, and 184832 (automatic installation of files >> that differ only by VCS Id) for the following reasons: >> 1. It was added without my consent, review, or even a heads up > > Huh? I sent you request for review on 24 October 2008 If that's the case then I apologize, I've been extremely overloaded lately and it's possible that this fell through the cracks. My other objections remain however, including the one about the -U option being a better solution that requires no new code. Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 06:58:45 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDBC1106566C; Fri, 2 Jan 2009 06:58:45 +0000 (UTC) (envelope-from kensmith@cse.Buffalo.EDU) Received: from phoebe.cse.buffalo.edu (phoebe.cse.buffalo.edu [128.205.32.89]) by mx1.freebsd.org (Postfix) with ESMTP id 8DB688FC16; Fri, 2 Jan 2009 06:58:45 +0000 (UTC) (envelope-from kensmith@cse.Buffalo.EDU) Received: from [192.168.1.101] (cpe-74-77-179-53.buffalo.res.rr.com [74.77.179.53]) (authenticated bits=0) by phoebe.cse.buffalo.edu (8.14.1/8.13.7) with ESMTP id n026wZtR037554 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Jan 2009 01:58:38 -0500 (EST) (envelope-from kensmith@cse.buffalo.edu) From: Ken Smith To: Maxim Sobolev In-Reply-To: <495DB7DF.5020603@FreeBSD.org> References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB7DF.5020603@FreeBSD.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-uwZY7u2atY9eD6ox4fQa" Date: Fri, 02 Jan 2009 01:58:29 -0500 Message-Id: <1230879509.12517.7.camel@neo.cse.buffalo.edu> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 FreeBSD GNOME Team Port X-DCC--Metrics: phoebe.cse.buffalo.edu 1336; Body=0 Fuz1=0 Fuz2=0 X-Spam-Status: No, score=1.7 required=5.0 tests=RCVD_IN_SORBS_DUL, RDNS_DYNAMIC autolearn=no version=3.2.3 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on phoebe.cse.buffalo.edu Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Doug Barton , src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 06:58:46 -0000 --=-uwZY7u2atY9eD6ox4fQa Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Thu, 2009-01-01 at 22:44 -0800, Maxim Sobolev wrote: > Doug Barton wrote: > > Given that this is a situation that comes up very infrequently (usual= ly > > only for a major version upgrade) and can usually be handled simply > > enough on a one-off basis, I will once again point out that I think > > this is a Bad Idea. I would be willing to consider a better implement= ation > > as an option that is off by default. >=20 > You are very wrong on this. This situation happens very *frequently*=20 > even for updates between minor releases (such as 6.3 to 6.4 and so on).=20 > As somebody doing lot of source upgrades frequently I can tell you this=20 > for sure. >=20 > -Maxim Just FWIW... What triggers it is creating a new branch tag. At the point we create a new releng/ in svn I need to have created the corresponding branch tag in the CVS repository first (e.g. RELENG_7_1 for releng/7.1). But then the svn2cvs exporter proceeds to check every file from releng/7.1 in to RELENG_7_1. So, you notice it the first time you try to upgrade into a new branch. Once you're in the branch updates get handled as you'd expect, just updating any of the files that have changed since the branch got created. And it doesn't happen with for example the tags that get created for the release (e.g. RELENG_7_1_0_RELEASE) which are "normal tags" as opposed to "branch tags". The exporter ignores the release/ tree in svn. --=20 Ken Smith - From there to here, from here to | kensmith@cse.buffalo.edu there, funny things are everywhere. | - Theodore Geisel | --=-uwZY7u2atY9eD6ox4fQa Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAklduwgACgkQ/G14VSmup/ZGPACcCboMSiBA9/sNYd+A99UuhBbN ZXQAn2MYSkRuqpGOSsbKssaiDNRgwXfJ =xclF -----END PGP SIGNATURE----- --=-uwZY7u2atY9eD6ox4fQa-- From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 07:25:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C14E106566C; Fri, 2 Jan 2009 07:25:30 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6828E8FC18; Fri, 2 Jan 2009 07:25:30 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n027PU6D090720; Fri, 2 Jan 2009 07:25:30 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n027PU8U090719; Fri, 2 Jan 2009 07:25:30 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901020725.n027PU8U090719@svn.freebsd.org> From: Doug Barton Date: Fri, 2 Jan 2009 07:25:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186695 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 07:25:31 -0000 Author: dougb Date: Fri Jan 2 07:25:30 2009 New Revision: 186695 URL: http://svn.freebsd.org/changeset/base/186695 Log: Simplify the code a little by moving the working part of ARCHSTRING into the new MM_MAKE variable. We only need to check for the presence of the target of $PAGER if that variable is actually set. [1] Pointed out by: Steve Kargl [1] Modified: head/usr.sbin/mergemaster/mergemaster.sh Modified: head/usr.sbin/mergemaster/mergemaster.sh ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 2 03:39:14 2009 (r186694) +++ head/usr.sbin/mergemaster/mergemaster.sh Fri Jan 2 07:25:30 2009 (r186695) @@ -371,7 +371,8 @@ echo '' # case "${DONT_CHECK_PAGER}" in '') - while ! type "${PAGER%% *}" >/dev/null && [ -n "${PAGER}" ]; do +check_pager () { + while ! type "${PAGER%% *}" >/dev/null; do echo " *** Your PAGER environment variable specifies '${PAGER}', but" echo " due to the limited PATH that I use for security reasons," echo " I cannot execute it. So, what would you like to do?" @@ -413,6 +414,10 @@ case "${DONT_CHECK_PAGER}" in esac echo '' done +} + if [ -n "${PAGER}" ]; then + check_pager + fi ;; esac @@ -444,7 +449,7 @@ if [ ! -f ${SOURCEDIR}/Makefile.inc1 -a fi # Setup make to use system files from SOURCEDIR -MM_MAKE="make -m ${SOURCEDIR}/share/mk" +MM_MAKE="make ${ARCHSTRING} -m ${SOURCEDIR}/share/mk" # Check DESTDIR against the mergemaster mtree database to see what # files the user changed from the reference files. @@ -584,14 +589,13 @@ case "${RERUN}" in case "${DESTDIR}" in '') ;; *) - ${MM_MAKE} DESTDIR=${DESTDIR} ${ARCHSTRING} distrib-dirs + ${MM_MAKE} DESTDIR=${DESTDIR} distrib-dirs ;; esac - ${MM_MAKE} DESTDIR=${TEMPROOT} ${ARCHSTRING} distrib-dirs && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} ${ARCHSTRING} obj SUBDIR_OVERRIDE=etc && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} ${ARCHSTRING} all SUBDIR_OVERRIDE=etc && - MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} ${ARCHSTRING} \ - DESTDIR=${TEMPROOT} distribution;} || + ${MM_MAKE} DESTDIR=${TEMPROOT} distrib-dirs && + MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} obj SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} all SUBDIR_OVERRIDE=etc && + MAKEOBJDIRPREFIX=${TEMPROOT}/usr/obj ${MM_MAKE} DESTDIR=${TEMPROOT} distribution;} || { echo ''; echo " *** FATAL ERROR: Cannot 'cd' to ${SOURCEDIR} and install files to"; echo " the temproot environment"; From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 07:29:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AAC6A106566B for ; Fri, 2 Jan 2009 07:29:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 15E7F8FC1A for ; Fri, 2 Jan 2009 07:29:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 20643 invoked by uid 399); 2 Jan 2009 07:29:20 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Jan 2009 07:29:20 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <495DC24E.90606@FreeBSD.org> Date: Thu, 01 Jan 2009 23:29:18 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.18 (X11/20081128) MIME-Version: 1.0 To: Sam Leffler References: <200901011141.n01BfDqj054333@svn.freebsd.org> <495D5FC3.6000109@freebsd.org> <495D62C0.7090306@FreeBSD.org> <495D63B6.3020106@freebsd.org> In-Reply-To: <495D63B6.3020106@freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 07:29:22 -0000 Sam Leffler wrote: > Doug Barton wrote: >> Sam Leffler wrote: >> >>> Doug Barton wrote: >>> >>>> 1. Switch to using the top level (e.g., /usr/src) Makefile, and >>>> specify >>>> that we should use the *.mk files from the source directory >>>> instead of >>>> the installed versions. [1][2] This allows easier cross builds and >>>> simplifies (or in some cases permits) upgrading. >>>> >>> I believe you changed the meaning of the -m flag so it now requires a >>> pathname to the src tree and not src/etc. This breaks existing >>> usage. In the PR I filed there was a follow-on patch from Bjoern that >>> amended >>> my suggestion to instead add a -M option to set the source tree. I >>> thought that was an improvement over my hack. In lieu of that you might >>> want to examine the pathname supplied to -m to try to provide backwards >>> compatibility by stripping any /etc suffix on the path. >>> >> >> The version in bin/96528 from ru had a better fix for this issue, but >> thanks for thinking of it. :) >> >> > That's nice to know. Unfortunately what's in HEAD doesn't seem to work > for my cross-install setup. Did you test using the recipe in my PR? I > am debugging; could be a local problem. I finally got this to work, but the problem wasn't with mergemaster. Turns out that bsd.obj.mk is not taking ${TARGET} into account in the same way that src/Makefile.inc1 does. I'm sending the following patch to -hackers for discussion: Index: bsd.obj.mk =================================================================== --- bsd.obj.mk (revision 186676) +++ bsd.obj.mk (working copy) @@ -43,7 +43,7 @@ .include .if defined(MAKEOBJDIRPREFIX) -CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} +CANONICALOBJDIR:=${OBJTREE}${.CURDIR} .else CANONICALOBJDIR:=/usr/obj${.CURDIR} .endif Meanwhile you can work around the problem with sendmail (which is the only thing mergemaster installs that cares) by setting WITHOUT_SENDMAIL in /etc/src.conf. hth, Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 07:32:19 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A262B106566B for ; Fri, 2 Jan 2009 07:32:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 0D54B8FC12 for ; Fri, 2 Jan 2009 07:32:19 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 23256 invoked by uid 399); 2 Jan 2009 07:32:18 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Jan 2009 07:32:18 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <495DC301.2090700@FreeBSD.org> Date: Thu, 01 Jan 2009 23:32:17 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.18 (X11/20081128) MIME-Version: 1.0 To: Gavin Atkinson References: <200901011055.n01AtQaN052763@svn.freebsd.org> <20090101215930.P70386@ury.york.ac.uk> In-Reply-To: <20090101215930.P70386@ury.york.ac.uk> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186677 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 07:32:19 -0000 Gavin Atkinson wrote: > On Thu, 1 Jan 2009, Doug Barton wrote: > >> Given that this is a situation that comes up very infrequently (usually >> only for a major version upgrade) > > This is no longer true: a side effect of having SVN exported to CVS is > that every time a branch is forked, the CVS ID is bumped, and as a > result is different between 7.0 and 7.1 even if the file itself isn't > changed. Thanks for that explanation. > As long as this is handled with -U, however, I'm not sure I see the need > for special handling. I'd love to see the -U otion as default, and a > pre-populated mtree database for it shipped with the releases, however. > This would go a long way towards making upgrading more user-friendly. I would not be supportive of -U as the default for reasons I've stated previously on numerous occasions. The idea of pre-installing an mtree database is interesting, but the problem is that it gets awkward when you compare virgin installs to upgrades (which don't touch /etc/ directly). If someone wants to work up patches to the release process I'd be happy to review them, but I have no idea what re@ would say to it. hth, Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 07:44:04 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 978861065691; Fri, 2 Jan 2009 07:44:04 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 5500F8FC23; Fri, 2 Jan 2009 07:44:04 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.28.129] (d75-157-251-204.bchsia.telus.net [75.157.251.204]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n027i13L093294 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Jan 2009 23:44:02 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <495DC5AF.3050908@FreeBSD.org> Date: Thu, 01 Jan 2009 23:43:43 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Doug Barton References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> In-Reply-To: <495DB9B6.4030801@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 07:44:05 -0000 Doug Barton wrote: > Maxim Sobolev wrote: >> Doug Barton wrote: >>> Author: dougb >>> Date: Thu Jan 1 10:55:26 2009 >>> New Revision: 186677 >>> URL: http://svn.freebsd.org/changeset/base/186677 >>> >>> Log: >>> Revert 184781, 184804, and 184832 (automatic installation of files >>> that differ only by VCS Id) for the following reasons: >>> 1. It was added without my consent, review, or even a heads up >> Huh? I sent you request for review on 24 October 2008 > > If that's the case then I apologize, I've been extremely overloaded > lately and it's possible that this fell through the cracks. > > My other objections remain however, including the one about the -U > option being a better solution that requires no new code. 1. -U option requires system to have the copy of the database from the previous upgrade. It gives no help on the system that was installed from CD. 2. If the functionality has some issues leading to false positives I can investigate and improve/fix. 3. I don't see anything so technically bad about that feature (put aside implementation details). I would like to hear some of your principal objections. -Maxim From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 08:21:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A0A4106564A; Fri, 2 Jan 2009 08:21:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 862C68FC08; Fri, 2 Jan 2009 08:21:21 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n028LLdg091686; Fri, 2 Jan 2009 08:21:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n028LLPa091685; Fri, 2 Jan 2009 08:21:21 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200901020821.n028LLPa091685@svn.freebsd.org> From: Warner Losh Date: Fri, 2 Jan 2009 08:21:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186696 - head/usr.sbin/fwcontrol X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 08:21:22 -0000 Author: imp Date: Fri Jan 2 08:21:21 2009 New Revision: 186696 URL: http://svn.freebsd.org/changeset/base/186696 Log: Add fd = -1 after close when we detect the format so that subsequent open_dev will reopen the device. Modified: head/usr.sbin/fwcontrol/fwcontrol.c Modified: head/usr.sbin/fwcontrol/fwcontrol.c ============================================================================== --- head/usr.sbin/fwcontrol/fwcontrol.c Fri Jan 2 07:25:30 2009 (r186695) +++ head/usr.sbin/fwcontrol/fwcontrol.c Fri Jan 2 08:21:21 2009 (r186696) @@ -1065,6 +1065,7 @@ main(int argc, char **argv) if (recvfn == NULL) { /* guess... */ recvfn = detect_recv_fn(fd, TAG | CHANNEL); close(fd); + fd = -1; } snprintf(devbase, sizeof(devbase), "%s%d.0", device_string, current_board); if (open_dev(&fd, devbase) < 0) From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 17:25:19 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2ACF106564A; Fri, 2 Jan 2009 17:25:19 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 3C3378FC17; Fri, 2 Jan 2009 17:25:18 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.3/8.14.2) with ESMTP id n02GuqvS022082; Fri, 2 Jan 2009 10:56:52 -0600 (CST) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.3/8.14.3/Submit) id n02GuqIV022081; Fri, 2 Jan 2009 10:56:52 -0600 (CST) (envelope-from brooks) Date: Fri, 2 Jan 2009 10:56:52 -0600 From: Brooks Davis To: Tom Rhodes Message-ID: <20090102165652.GA8152@lor.one-eyed-alien.net> References: <200812231335.mBNDZRBZ003693@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline In-Reply-To: <200812231335.mBNDZRBZ003693@svn.freebsd.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (lor.one-eyed-alien.net [127.0.0.1]); Fri, 02 Jan 2009 10:56:52 -0600 (CST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r186429 - head/sbin/mount_msdosfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 17:25:20 -0000 --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Dec 23, 2008 at 01:35:27PM +0000, Tom Rhodes wrote: > Author: trhodes > Date: Tue Dec 23 13:35:26 2008 > New Revision: 186429 > URL: http://svn.freebsd.org/changeset/base/186429 >=20 > Log: > Document the "-o large" option. > =20 > PR: 129792 >=20 > Modified: > head/sbin/mount_msdosfs/mount_msdosfs.8 >=20 > Modified: head/sbin/mount_msdosfs/mount_msdosfs.8 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sbin/mount_msdosfs/mount_msdosfs.8 Tue Dec 23 13:09:17 2008 (r18= 6428) > +++ head/sbin/mount_msdosfs/mount_msdosfs.8 Tue Dec 23 13:35:26 2008 (r18= 6429) > @@ -30,7 +30,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd April 7, 1994 > +.Dd December 23, 2008 > .Dt MOUNT_MSDOSFS 8 > .Os > .Sh NAME > @@ -73,6 +73,11 @@ as described in > .Xr mount 8 . > The following MSDOS file system-specific options are available: > .Bl -tag -width indent > +.It Cm large > +Support file systems larger than 128 gigabytes at the expense > +of 32 bytes of kernel memory. The second half of this sentence doesn't make sense. If it's 32-bytes per file system, that's not worth mentioning since the mount table entry is going to be a bigger than that. Presumably there's a missing qualifier like "per file opened" or something. > +This memory will not be reclaimed until the file system has > +been unmounted. > .It Cm longnames > Force Windows 95 long filenames to be visible. > .It Cm shortnames -- Brooks --6c2NcOVqGQ03X4Wi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFJXkdTXY6L6fI4GtQRAspMAJ9GyZuIQNKzW03YuEcI+UgTzZMA0ACgkURw Bj/5LoOnElj4/0AfU5y96Vw= =OYAx -----END PGP SIGNATURE----- --6c2NcOVqGQ03X4Wi-- From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 17:38:36 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8AE81065672; Fri, 2 Jan 2009 17:38:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 891188FC17; Fri, 2 Jan 2009 17:38:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n02HcZkl027727 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Jan 2009 09:38:35 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <495E511B.7000006@freebsd.org> Date: Fri, 02 Jan 2009 09:38:35 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Doug Barton References: <200901011141.n01BfDqj054333@svn.freebsd.org> <495D5FC3.6000109@freebsd.org> <495D62C0.7090306@FreeBSD.org> <495D63B6.3020106@freebsd.org> <495DC24E.90606@FreeBSD.org> In-Reply-To: <495DC24E.90606@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 17:38:37 -0000 Doug Barton wrote: > Sam Leffler wrote: > >> Doug Barton wrote: >> >>> Sam Leffler wrote: >>> >>> >>>> Doug Barton wrote: >>>> >>>> >>>>> 1. Switch to using the top level (e.g., /usr/src) Makefile, and >>>>> specify >>>>> that we should use the *.mk files from the source directory >>>>> instead of >>>>> the installed versions. [1][2] This allows easier cross builds and >>>>> simplifies (or in some cases permits) upgrading. >>>>> >>>>> >>>> I believe you changed the meaning of the -m flag so it now requires a >>>> pathname to the src tree and not src/etc. This breaks existing >>>> usage. In the PR I filed there was a follow-on patch from Bjoern that >>>> amended >>>> my suggestion to instead add a -M option to set the source tree. I >>>> thought that was an improvement over my hack. In lieu of that you might >>>> want to examine the pathname supplied to -m to try to provide backwards >>>> compatibility by stripping any /etc suffix on the path. >>>> >>>> >>> The version in bin/96528 from ru had a better fix for this issue, but >>> thanks for thinking of it. :) >>> >>> >>> >> That's nice to know. Unfortunately what's in HEAD doesn't seem to work >> for my cross-install setup. Did you test using the recipe in my PR? I >> am debugging; could be a local problem. >> > > I finally got this to work, but the problem wasn't with mergemaster. > Turns out that bsd.obj.mk is not taking ${TARGET} into account in the > same way that src/Makefile.inc1 does. I'm sending the following patch > to -hackers for discussion: > > Index: bsd.obj.mk > =================================================================== > --- bsd.obj.mk (revision 186676) > +++ bsd.obj.mk (working copy) > @@ -43,7 +43,7 @@ > .include > > .if defined(MAKEOBJDIRPREFIX) > -CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} > +CANONICALOBJDIR:=${OBJTREE}${.CURDIR} > .else > CANONICALOBJDIR:=/usr/obj${.CURDIR} > .endif > > Meanwhile you can work around the problem with sendmail (which is the > only thing mergemaster installs that cares) by setting > WITHOUT_SENDMAIL in /etc/src.conf. > > Presumably this is because I was testing w/o your changes to run builds from /usr/src (instead of /usr/src/etc)? The patch I provided in the PR definitely worked. Unfortunately the above change does not help me; I still fail in sendmail as before. I don't see where OBJTREE is defined in any .mk file or by make (searching the man page). Sam From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 22:01:56 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEDCC1065677 for ; Fri, 2 Jan 2009 22:01:56 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 2FF3D8FC18 for ; Fri, 2 Jan 2009 22:01:56 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 9494 invoked by uid 399); 2 Jan 2009 22:01:55 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Jan 2009 22:01:55 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <495E8ED1.2010108@FreeBSD.org> Date: Fri, 02 Jan 2009 14:01:53 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.18 (X11/20081128) MIME-Version: 1.0 To: Sam Leffler References: <200901011141.n01BfDqj054333@svn.freebsd.org> <495D5FC3.6000109@freebsd.org> <495D62C0.7090306@FreeBSD.org> <495D63B6.3020106@freebsd.org> <495DC24E.90606@FreeBSD.org> <495E511B.7000006@freebsd.org> In-Reply-To: <495E511B.7000006@freebsd.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 22:01:57 -0000 Sam Leffler wrote: > Doug Barton wrote: >> Sam Leffler wrote: >> >>> Doug Barton wrote: >>> >>>> Sam Leffler wrote: >>>> >>>> >>>>> Doug Barton wrote: >>>>> >>>>>> 1. Switch to using the top level (e.g., /usr/src) Makefile, and >>>>>> specify >>>>>> that we should use the *.mk files from the source directory >>>>>> instead of >>>>>> the installed versions. [1][2] This allows easier cross builds and >>>>>> simplifies (or in some cases permits) upgrading. >>>>>> >>>>> I believe you changed the meaning of the -m flag so it now requires a >>>>> pathname to the src tree and not src/etc. This breaks existing >>>>> usage. In the PR I filed there was a follow-on patch from Bjoern that >>>>> amended >>>>> my suggestion to instead add a -M option to set the source tree. I >>>>> thought that was an improvement over my hack. In lieu of that you >>>>> might >>>>> want to examine the pathname supplied to -m to try to provide >>>>> backwards >>>>> compatibility by stripping any /etc suffix on the path. >>>>> >>>> The version in bin/96528 from ru had a better fix for this issue, but >>>> thanks for thinking of it. :) >>>> >>>> >>> That's nice to know. Unfortunately what's in HEAD doesn't seem to work >>> for my cross-install setup. Did you test using the recipe in my PR? I >>> am debugging; could be a local problem. >>> >> >> I finally got this to work, but the problem wasn't with mergemaster. >> Turns out that bsd.obj.mk is not taking ${TARGET} into account in the >> same way that src/Makefile.inc1 does. I'm sending the following patch >> to -hackers for discussion: >> >> Index: bsd.obj.mk >> =================================================================== >> --- bsd.obj.mk (revision 186676) >> +++ bsd.obj.mk (working copy) >> @@ -43,7 +43,7 @@ >> .include >> >> .if defined(MAKEOBJDIRPREFIX) >> -CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} >> +CANONICALOBJDIR:=${OBJTREE}${.CURDIR} >> .else >> CANONICALOBJDIR:=/usr/obj${.CURDIR} >> .endif >> >> Meanwhile you can work around the problem with sendmail (which is the >> only thing mergemaster installs that cares) by setting >> WITHOUT_SENDMAIL in /etc/src.conf. >> >> > Presumably this is because I was testing w/o your changes to run builds > from /usr/src (instead of /usr/src/etc)? At the point where it's actually building and installing things to the temproot there is a SUBDIR_OVERRIDE which restricts it to src/etc so that shouldn't make any difference. > Unfortunately the above change does not help me; I still fail in > sendmail as before. I don't see where OBJTREE is defined in any .mk > file or by make (searching the man page). It's defined in src/Makefile.inc1. Try running the most recent version of mergemaster that's in the tree, plus the patch above to src/share/mk/bsd.obj.mk and it should work. It worked for me using a clean DESTDIR, -i and -Aarm. I didn't specify a different src directory as you did in the PR since I was using my regular stock src tree (plus the bsd.obj.mk patch above). hth, Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 22:15:23 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5021110656CF for ; Fri, 2 Jan 2009 22:15:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 9A34A8FC23 for ; Fri, 2 Jan 2009 22:15:22 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 22775 invoked by uid 399); 2 Jan 2009 22:15:21 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Jan 2009 22:15:21 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <495E91F8.3010706@FreeBSD.org> Date: Fri, 02 Jan 2009 14:15:20 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.18 (X11/20081128) MIME-Version: 1.0 To: Maxim Sobolev References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> In-Reply-To: <495DC5AF.3050908@FreeBSD.org> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 22:15:23 -0000 Maxim Sobolev wrote: > Doug Barton wrote: >> My other objections remain however, including the one about the -U >> option being a better solution that requires no new code. > > 1. -U option requires system to have the copy of the database from the > previous upgrade. It gives no help on the system that was installed from > CD. The man page clearly documents adding a DIFF_OPTION to ignore the CVS Id tags which the user can use the first time through. Thus they can do the update with new sources and build a database for the -U option next time through (which happens automatically in the background every time mergemaster is run). > 2. If the functionality has some issues leading to false positives I can > investigate and improve/fix. This is a given. > 3. I don't see anything so technically bad about that feature (put aside > implementation details). I would like to hear some of your principal > objections. As in any software project, extra code that isn't needed is a Bad Thing. It has maintenance costs down the road, and can lead to problems if one of the expectations its built on changes. A key part of the implementation of mergemaster is that it is (now, relatively) simple, and knows as little as possible about the files it manipulates. As I said in my first post, if there is overwhelming demand for this down the road that is not met by the existing solutions I'll consider adding a better implementation as an option, off by default. Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 22:24:13 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B059106564A; Fri, 2 Jan 2009 22:24:13 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 275B98FC13; Fri, 2 Jan 2009 22:24:13 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n02MODXi009012; Fri, 2 Jan 2009 22:24:13 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n02MOCGF009011; Fri, 2 Jan 2009 22:24:12 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200901022224.n02MOCGF009011@svn.freebsd.org> From: Doug Barton Date: Fri, 2 Jan 2009 22:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186704 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 22:24:14 -0000 Author: dougb Date: Fri Jan 2 22:24:12 2009 New Revision: 186704 URL: http://svn.freebsd.org/changeset/base/186704 Log: Add a note to the -m option indicating that you should now specify src/ instead of src/etc. Modified: head/usr.sbin/mergemaster/mergemaster.8 Modified: head/usr.sbin/mergemaster/mergemaster.8 ============================================================================== --- head/usr.sbin/mergemaster/mergemaster.8 Fri Jan 2 19:55:17 2009 (r186703) +++ head/usr.sbin/mergemaster/mergemaster.8 Fri Jan 2 22:24:12 2009 (r186704) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 1, 2009 +.Dd January 2, 2009 .Dt MERGEMASTER 8 .Os .Sh NAME @@ -218,6 +218,14 @@ Specify the path to the directory where .Xr make 1 . (In other words, where your sources are, but -s was already taken.) +In previous versions of +.Nm +you needed to specify the path all the way to +.Pa src/etc . +Starting with r186678 you only need to specify the path to +.Pa src . +.Nm +will convert the path for you if you use the old method. .It Fl t Ar /path/to/temp/root Create the temporary root environment in .Pa /path/to/temp/root From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 22:51:31 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52E13106566B; Fri, 2 Jan 2009 22:51:31 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 401F48FC18; Fri, 2 Jan 2009 22:51:31 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n02MpVoj009663; Fri, 2 Jan 2009 22:51:31 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n02MpVav009662; Fri, 2 Jan 2009 22:51:31 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200901022251.n02MpVav009662@svn.freebsd.org> From: Qing Li Date: Fri, 2 Jan 2009 22:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186705 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 22:51:31 -0000 Author: qingli Date: Fri Jan 2 22:51:30 2009 New Revision: 186705 URL: http://svn.freebsd.org/changeset/base/186705 Log: The log message should terminate with a newline instead of a tab character. Modified: head/sys/net/route.c Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Fri Jan 2 22:24:12 2009 (r186704) +++ head/sys/net/route.c Fri Jan 2 22:51:30 2009 (r186705) @@ -350,7 +350,7 @@ rtfree(struct rtentry *rt) */ RT_REMREF(rt); if (rt->rt_refcnt > 0) { - log(LOG_DEBUG, "%s: %p has %d refs\t", __func__, rt, rt->rt_refcnt); + log(LOG_DEBUG, "%s: %p has %d refs\n", __func__, rt, rt->rt_refcnt); goto done; } From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 22:52:07 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E493A106564A; Fri, 2 Jan 2009 22:52:07 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (hergotha.csail.mit.edu [66.92.79.170]) by mx1.freebsd.org (Postfix) with ESMTP id 887A98FC1C; Fri, 2 Jan 2009 22:52:01 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (localhost [127.0.0.1]) by hergotha.csail.mit.edu (8.14.2/8.14.2) with ESMTP id n02MI9OM019748; Fri, 2 Jan 2009 17:18:09 -0500 (EST) (envelope-from wollman@hergotha.csail.mit.edu) Received: (from wollman@localhost) by hergotha.csail.mit.edu (8.14.2/8.13.8/Submit) id n02MI953019745; Fri, 2 Jan 2009 17:18:09 -0500 (EST) (envelope-from wollman) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18782.37537.775290.682466@hergotha.csail.mit.edu> Date: Fri, 2 Jan 2009 17:18:09 -0500 From: Garrett Wollman To: Doug Barton In-Reply-To: <495E91F8.3010706@FreeBSD.org> References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> X-Mailer: VM 7.17 under 21.4 (patch 21) "Educational Television" XEmacs Lucid X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (hergotha.csail.mit.edu [127.0.0.1]); Fri, 02 Jan 2009 17:18:10 -0500 (EST) X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hergotha.csail.mit.edu Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 22:52:08 -0000 < said: > As I said in my first post, if there is overwhelming demand for this > down the road that is not met by the existing solutions I'll consider > adding a better implementation as an option, off by default. It would be much better if the options that *nearly every user will want to use* are set correctly by default. I have to look at the man page every time I update a system to remind myself what is that magic option that makes mergemaster do the right thing with files I haven't changed. -GAWollman From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 22:53:55 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35C321065780; Fri, 2 Jan 2009 22:53:55 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id E46668FC13; Fri, 2 Jan 2009 22:53:54 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id n02MrpqH029120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Jan 2009 14:53:54 -0800 (PST) (envelope-from sam@freebsd.org) Message-ID: <495E9AFF.4010109@freebsd.org> Date: Fri, 02 Jan 2009 14:53:51 -0800 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.18 (X11/20081209) MIME-Version: 1.0 To: Doug Barton References: <200901011141.n01BfDqj054333@svn.freebsd.org> <495D5FC3.6000109@freebsd.org> <495D62C0.7090306@FreeBSD.org> <495D63B6.3020106@freebsd.org> <495DC24E.90606@FreeBSD.org> <495E511B.7000006@freebsd.org> <495E8ED1.2010108@FreeBSD.org> In-Reply-To: <495E8ED1.2010108@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-sonic.net-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186678 - head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 22:53:56 -0000 Doug Barton wrote: > Sam Leffler wrote: > >> Doug Barton wrote: >> >>> Sam Leffler wrote: >>> >>> >>>> Doug Barton wrote: >>>> >>>> >>>>> Sam Leffler wrote: >>>>> >>>>> >>>>> >>>>>> Doug Barton wrote: >>>>>> >>>>>> >>>>>>> 1. Switch to using the top level (e.g., /usr/src) Makefile, and >>>>>>> specify >>>>>>> that we should use the *.mk files from the source directory >>>>>>> instead of >>>>>>> the installed versions. [1][2] This allows easier cross builds and >>>>>>> simplifies (or in some cases permits) upgrading. >>>>>>> >>>>>>> >>>>>> I believe you changed the meaning of the -m flag so it now requires a >>>>>> pathname to the src tree and not src/etc. This breaks existing >>>>>> usage. In the PR I filed there was a follow-on patch from Bjoern that >>>>>> amended >>>>>> my suggestion to instead add a -M option to set the source tree. I >>>>>> thought that was an improvement over my hack. In lieu of that you >>>>>> might >>>>>> want to examine the pathname supplied to -m to try to provide >>>>>> backwards >>>>>> compatibility by stripping any /etc suffix on the path. >>>>>> >>>>>> >>>>> The version in bin/96528 from ru had a better fix for this issue, but >>>>> thanks for thinking of it. :) >>>>> >>>>> >>>>> >>>> That's nice to know. Unfortunately what's in HEAD doesn't seem to work >>>> for my cross-install setup. Did you test using the recipe in my PR? I >>>> am debugging; could be a local problem. >>>> >>>> >>> I finally got this to work, but the problem wasn't with mergemaster. >>> Turns out that bsd.obj.mk is not taking ${TARGET} into account in the >>> same way that src/Makefile.inc1 does. I'm sending the following patch >>> to -hackers for discussion: >>> >>> Index: bsd.obj.mk >>> =================================================================== >>> --- bsd.obj.mk (revision 186676) >>> +++ bsd.obj.mk (working copy) >>> @@ -43,7 +43,7 @@ >>> .include >>> >>> .if defined(MAKEOBJDIRPREFIX) >>> -CANONICALOBJDIR:=${MAKEOBJDIRPREFIX}${.CURDIR} >>> +CANONICALOBJDIR:=${OBJTREE}${.CURDIR} >>> .else >>> CANONICALOBJDIR:=/usr/obj${.CURDIR} >>> .endif >>> >>> Meanwhile you can work around the problem with sendmail (which is the >>> only thing mergemaster installs that cares) by setting >>> WITHOUT_SENDMAIL in /etc/src.conf. >>> >>> >>> >> Presumably this is because I was testing w/o your changes to run builds >> from /usr/src (instead of /usr/src/etc)? >> > > At the point where it's actually building and installing things to the > temproot there is a SUBDIR_OVERRIDE which restricts it to src/etc so > that shouldn't make any difference. > > >> Unfortunately the above change does not help me; I still fail in >> sendmail as before. I don't see where OBJTREE is defined in any .mk >> file or by make (searching the man page). >> > > It's defined in src/Makefile.inc1. Try running the most recent version > of mergemaster that's in the tree, plus the patch above to > src/share/mk/bsd.obj.mk and it should work. It worked for me using a > clean DESTDIR, -i and -Aarm. I didn't specify a different src > directory as you did in the PR since I was using my regular stock src > tree (plus the bsd.obj.mk patch above). > My tests were w/ an up to date tree. Sam From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 23:08:02 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD0A41065674 for ; Fri, 2 Jan 2009 23:08:02 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx22.fluidhosting.com [204.14.89.5]) by mx1.freebsd.org (Postfix) with ESMTP id 6238C8FC1A for ; Fri, 2 Jan 2009 23:07:57 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 9745 invoked by uid 399); 2 Jan 2009 23:07:56 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 2 Jan 2009 23:07:56 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <495E9E4B.8030905@FreeBSD.org> Date: Fri, 02 Jan 2009 15:07:55 -0800 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.18 (X11/20081128) MIME-Version: 1.0 To: Garrett Wollman References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> In-Reply-To: <18782.37537.775290.682466@hergotha.csail.mit.edu> X-Enigmail-Version: 0.95.7 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 23:08:03 -0000 Garrett Wollman wrote: > < said: > >> As I said in my first post, if there is overwhelming demand for this >> down the road that is not met by the existing solutions I'll consider >> adding a better implementation as an option, off by default. > > It would be much better if the options that *nearly every user will > want to use* are set correctly by default. 1. Past experience indicates that your average _developer_ is not very good at estimating what the average _user_ will want as the default. 2. The needs of developers are considerably different than the needs of the average user. 3. Many "power user" options have been added over the years, but they are just that, options. 4. I have said literally from day 1 that mergemaster should not ever change a file on a user's system without them taking an affirmative step for it to do so. Whether you agree with that idea or not, it is an expectation that I do not want to mess with. > I have to look at the man > page every time I update a system to remind myself what is that magic > option that makes mergemaster do the right thing with files I haven't > changed. Given the number of help requests I get for mergemaster that are already answered in the man page, I do not regard this as all that big of a problem. :) But seriously folks, have you read all the way down to the part about the ability to use an rc file to store your commonly used options? Doug -- This .signature sanitized for your protection From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 23:14:25 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0183106564A; Fri, 2 Jan 2009 23:14:25 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (hergotha.csail.mit.edu [66.92.79.170]) by mx1.freebsd.org (Postfix) with ESMTP id 86E3B8FC08; Fri, 2 Jan 2009 23:14:25 +0000 (UTC) (envelope-from wollman@hergotha.csail.mit.edu) Received: from hergotha.csail.mit.edu (localhost [127.0.0.1]) by hergotha.csail.mit.edu (8.14.2/8.14.2) with ESMTP id n02NEOoG020447; Fri, 2 Jan 2009 18:14:24 -0500 (EST) (envelope-from wollman@hergotha.csail.mit.edu) Received: (from wollman@localhost) by hergotha.csail.mit.edu (8.14.2/8.13.8/Submit) id n02NEOaR020444; Fri, 2 Jan 2009 18:14:24 -0500 (EST) (envelope-from wollman) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18782.40912.247441.716938@hergotha.csail.mit.edu> Date: Fri, 2 Jan 2009 18:14:24 -0500 From: Garrett Wollman To: Doug Barton In-Reply-To: <495E9E4B.8030905@FreeBSD.org> References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> X-Mailer: VM 7.17 under 21.4 (patch 21) "Educational Television" XEmacs Lucid X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (hergotha.csail.mit.edu [127.0.0.1]); Fri, 02 Jan 2009 18:14:24 -0500 (EST) X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=disabled version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on hergotha.csail.mit.edu Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 23:14:26 -0000 < said: > Garrett Wollman wrote: >> It would be much better if the options that *nearly every user will >> want to use* are set correctly by default. > 1. Past experience indicates that your average _developer_ is not very > good at estimating what the average _user_ will want as the default. Speaking as a user, far more than a developer these days, what mergemaster does by default is not what I want. I have about half a dozen FreeBSD systems in various states of "production", and they get upgraded about once a year, if that, and always run the security branch. > 4. I have said literally from day 1 that mergemaster should not ever > change a file on a user's system without them taking an affirmative > step for it to do so. Whether you agree with that idea or not, it is > an expectation that I do not want to mess with. Does anyone else have that expectation, or do they think of it as an annoying quirk of the program and wish the author would make it be more helpful by default? Is there any evidence that the current default behavior is the Right Thing for the typical user? (Serious question. Maybe it solves some problem that's not the one that I have; I haven't done a survey.) -GAWollman From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 23:32:44 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12A2F106564A; Fri, 2 Jan 2009 23:32:44 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0004A8FC0C; Fri, 2 Jan 2009 23:32:43 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n02NWhU8010413; Fri, 2 Jan 2009 23:32:43 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n02NWhbX010412; Fri, 2 Jan 2009 23:32:43 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901022332.n02NWhbX010412@svn.freebsd.org> From: Ed Schouten Date: Fri, 2 Jan 2009 23:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186706 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 23:32:44 -0000 Author: ed Date: Fri Jan 2 23:32:43 2009 New Revision: 186706 URL: http://svn.freebsd.org/changeset/base/186706 Log: Don't let /dev/console be revoked if the TTY below is being closed. During startup some of the syscons TTY's are used to set attributes like the screensaver and mouse options. These actions cause /dev/console to be rendered unusable. Fix the issue by leaving the TTY opened when it is used as the console device. Reported by: imp Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Fri Jan 2 22:51:30 2009 (r186705) +++ head/sys/kern/tty.c Fri Jan 2 23:32:43 2009 (r186706) @@ -308,6 +308,13 @@ ttydev_close(struct cdev *dev, int fflag { struct tty *tp = dev->si_drv1; + /* + * Don't actually close the device if it is being used as the + * console. + */ + if (strcmp(dev_console_filename, tty_devname(tp)) == 0) + return (0); + tty_lock(tp); /* From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 23:34:32 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21DB91065700; Fri, 2 Jan 2009 23:34:32 +0000 (UTC) (envelope-from xi@borderworlds.dk) Received: from kazon.borderworlds.dk (kazon.borderworlds.dk [213.239.213.48]) by mx1.freebsd.org (Postfix) with ESMTP id D05D88FC16; Fri, 2 Jan 2009 23:34:31 +0000 (UTC) (envelope-from xi@borderworlds.dk) Received: from dominion.borderworlds.dk (localhost [127.0.0.1]) by kazon.borderworlds.dk (Postfix) with ESMTP id D4102170A8; Sat, 3 Jan 2009 00:19:02 +0100 (CET) Received: by dominion.borderworlds.dk (Postfix, from userid 2000) id 8393047C; Sat, 3 Jan 2009 00:19:02 +0100 (CET) To: Garrett Wollman References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> From: Christian Laursen Date: Sat, 03 Jan 2009 00:19:02 +0100 In-Reply-To: <18782.37537.775290.682466@hergotha.csail.mit.edu> (Garrett Wollman's message of "Fri\, 2 Jan 2009 17\:18\:09 -0500") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Doug Barton , src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 23:34:32 -0000 Garrett Wollman writes: > It would be much better if the options that *nearly every user will > want to use* are set correctly by default. I have to look at the man > page every time I update a system to remind myself what is that magic > option that makes mergemaster do the right thing with files I haven't > changed. I agree that auto-install and auto-upgrade would be nice to have on by default. However, mergemaster has a configuration file so you actually only need to make things right once for every system. cat > /etc/mergemaster.rc AUTO_INSTALL=yes AUTO_UPGRADE=yes ^d -- Christian Laursen From owner-svn-src-head@FreeBSD.ORG Fri Jan 2 23:39:31 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 646691065766; Fri, 2 Jan 2009 23:39:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA11B8FC1D; Fri, 2 Jan 2009 23:39:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n02NdTmP010588; Fri, 2 Jan 2009 23:39:29 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n02NdTjf010587; Fri, 2 Jan 2009 23:39:29 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901022339.n02NdTjf010587@svn.freebsd.org> From: Ed Schouten Date: Fri, 2 Jan 2009 23:39:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186707 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 23:39:32 -0000 Author: ed Date: Fri Jan 2 23:39:29 2009 New Revision: 186707 URL: http://svn.freebsd.org/changeset/base/186707 Log: Fix a corner case in my previous commit. Even though there are not many setups that have absolutely no console device, make sure a close() on a TTY doesn't dereference a null pointer. Modified: head/sys/kern/tty.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Fri Jan 2 23:32:43 2009 (r186706) +++ head/sys/kern/tty.c Fri Jan 2 23:39:29 2009 (r186707) @@ -312,7 +312,8 @@ ttydev_close(struct cdev *dev, int fflag * Don't actually close the device if it is being used as the * console. */ - if (strcmp(dev_console_filename, tty_devname(tp)) == 0) + if (dev_console_filename != NULL && + strcmp(dev_console_filename, tty_devname(tp)) == 0) return (0); tty_lock(tp); From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 00:27:29 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 946F31065756; Sat, 3 Jan 2009 00:27:29 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8307B8FC1C; Sat, 3 Jan 2009 00:27:29 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n030RTGQ011523; Sat, 3 Jan 2009 00:27:29 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n030RT1e011521; Sat, 3 Jan 2009 00:27:29 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200901030027.n030RT1e011521@svn.freebsd.org> From: Qing Li Date: Sat, 3 Jan 2009 00:27:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186708 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 00:27:30 -0000 Author: qingli Date: Sat Jan 3 00:27:28 2009 New Revision: 186708 URL: http://svn.freebsd.org/changeset/base/186708 Log: Some modules such as SCTP supplies a valid route entry as an input argument to ip_output(). The destionation is represented in a sockaddr{} object that may contain other pieces of information, e.g., port number. This same destination sockaddr{} object may be passed into L2 code, which could be used to create a L2 entry. Since there exists a L2 table per address family, the L2 lookup function can make address family specific comparison instead of the generic bcmp() operation over the entire sockaddr{} structure. Note in the IPv6 case the sin6_scope_id is not compared because the address is currently stored in the embedded form inside the kernel. The in6_lltable_lookup() has to account for the scope-id if this storage format were to change in the future. Modified: head/sys/netinet/in.c head/sys/netinet6/in6.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Fri Jan 2 23:39:29 2009 (r186707) +++ head/sys/netinet/in.c Sat Jan 3 00:27:28 2009 (r186708) @@ -1106,9 +1106,10 @@ in_lltable_lookup(struct lltable *llt, u hashkey = sin->sin_addr.s_addr; lleh = &llt->lle_head[LLATBL_HASH(hashkey, LLTBL_HASHMASK)]; LIST_FOREACH(lle, lleh, lle_next) { + struct sockaddr_in *sa2 = (struct sockaddr_in *)L3_ADDR(lle); if (lle->la_flags & LLE_DELETED) continue; - if (bcmp(L3_ADDR(lle), l3addr, sizeof(struct sockaddr_in)) == 0) + if (sa2->sin_addr.s_addr == sin->sin_addr.s_addr) break; } if (lle == NULL) { Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Fri Jan 2 23:39:29 2009 (r186707) +++ head/sys/netinet6/in6.c Sat Jan 3 00:27:28 2009 (r186708) @@ -1533,52 +1533,29 @@ in6_ifinit(struct ifnet *ifp, struct in6 * XXX: the logic below rejects assigning multiple addresses on a p2p * interface that share the same destination. */ -#if 0 /* QL - verify */ plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */ - if (!(ia->ia_flags & IFA_ROUTE) && plen == 128 && - ia->ia_dstaddr.sin6_family == AF_INET6) { + if (!(ia->ia_flags & IFA_ROUTE) && plen == 128) { + struct sockaddr *dstaddr; int rtflags = RTF_UP | RTF_HOST; - struct rtentry *rt = NULL, **rtp = NULL; - if (nd6_need_cache(ifp) != 0) { - rtp = &rt; - } + /* + * use the interface address if configuring an + * interface address with a /128 prefix len + */ + if (ia->ia_dstaddr.sin6_family == AF_INET6) + dstaddr = (struct sockaddr *)&ia->ia_dstaddr; + else + dstaddr = (struct sockaddr *)&ia->ia_addr; error = rtrequest(RTM_ADD, - (struct sockaddr *)&ia->ia_dstaddr, + (struct sockaddr *)dstaddr, (struct sockaddr *)&ia->ia_addr, (struct sockaddr *)&ia->ia_prefixmask, - ia->ia_flags | rtflags, rtp); + ia->ia_flags | rtflags, NULL); if (error != 0) return (error); - if (rt != NULL) { - struct llinfo_nd6 *ln; - - RT_LOCK(rt); - ln = (struct llinfo_nd6 *)rt->rt_llinfo; - if (ln != NULL) { - /* - * Set the state to STALE because we don't - * have to perform address resolution on this - * link. - */ - ln->ln_state = ND6_LLINFO_STALE; - } - RT_REMREF(rt); - RT_UNLOCK(rt); - } - ia->ia_flags |= IFA_ROUTE; - } -#else - plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */ - if (!(ia->ia_flags & IFA_ROUTE) && plen == 128 && - ia->ia_dstaddr.sin6_family == AF_INET6) { - if ((error = rtinit(&(ia->ia_ifa), (int)RTM_ADD, - RTF_UP | RTF_HOST)) != 0) - return (error); ia->ia_flags |= IFA_ROUTE; } -#endif /* Add ownaddr as loopback rtentry, if necessary (ex. on p2p link). */ if (newhost) { @@ -2171,9 +2148,11 @@ in6_lltable_lookup(struct lltable *llt, hashkey = sin6->sin6_addr.s6_addr32[3]; lleh = &llt->lle_head[LLATBL_HASH(hashkey, LLTBL_HASHMASK)]; LIST_FOREACH(lle, lleh, lle_next) { + struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *)L3_ADDR(lle); if (lle->la_flags & LLE_DELETED) continue; - if (bcmp(L3_ADDR(lle), l3addr, l3addr->sa_len) == 0) + if (bcmp(&sa6->sin6_addr, &sin6->sin6_addr, + sizeof(struct in6_addr)) == 0) break; } From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 00:51:47 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C8161065678 for ; Sat, 3 Jan 2009 00:51:47 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outM.internet-mail-service.net (outm.internet-mail-service.net [216.240.47.236]) by mx1.freebsd.org (Postfix) with ESMTP id 453038FC1D for ; Sat, 3 Jan 2009 00:51:47 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id CD860236F; Fri, 2 Jan 2009 16:51:46 -0800 (PST) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 4D2BE2D6020; Fri, 2 Jan 2009 16:51:46 -0800 (PST) Message-ID: <495EB69F.8010203@elischer.org> Date: Fri, 02 Jan 2009 16:51:43 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Garrett Wollman References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> <18782.40912.247441.716938@hergotha.csail.mit.edu> In-Reply-To: <18782.40912.247441.716938@hergotha.csail.mit.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Doug Barton , src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 00:51:47 -0000 Garrett Wollman wrote: > < said: > >> Garrett Wollman wrote: >>> It would be much better if the options that *nearly every user will >>> want to use* are set correctly by default. > >> 1. Past experience indicates that your average _developer_ is not very >> good at estimating what the average _user_ will want as the default. > > Speaking as a user, far more than a developer these days, what > mergemaster does by default is not what I want. I have about half a > dozen FreeBSD systems in various states of "production", and they get > upgraded about once a year, if that, and always run the security > branch. > >> 4. I have said literally from day 1 that mergemaster should not ever >> change a file on a user's system without them taking an affirmative >> step for it to do so. Whether you agree with that idea or not, it is >> an expectation that I do not want to mess with. > > Does anyone else have that expectation, or do they think of it as an > annoying quirk of the program and wish the author would make it be > more helpful by default? Is there any evidence that the current > default behavior is the Right Thing for the typical user? (Serious > question. Maybe it solves some problem that's not the one that I > have; I haven't done a survey.) > I 'm always pissed off that I have to type 'i' so many times. I'd like to get a list "I'd like to replace all these.. edit it this list and remove any you do not want me to remplace".. basically I just want to do /etc/passwd and a few friends, group, hosts manually on my development machines. I want everything else to be updated... yet after a couple of months if I run mergemaster, I spend 10 minutes hitting i i i q i i i i i q i q i (the q is for less or more or whaterver the pager is) alternatively a "leave the following files alone when in auto mode" option would do for me. > -GAWollman From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 03:14:26 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6071F106564A; Sat, 3 Jan 2009 03:14:26 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3E75E8FC0C; Sat, 3 Jan 2009 03:14:26 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.2/8.14.2) with ESMTP id n033Dufl077182; Fri, 2 Jan 2009 19:13:56 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.2/Submit) id n033DsEn077181; Fri, 2 Jan 2009 19:13:54 -0800 (PST) (envelope-from obrien) Date: Fri, 2 Jan 2009 19:13:54 -0800 From: "David O'Brien" To: Julian Elischer Message-ID: <20090103031354.GB76838@dragon.NUXI.org> References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> <18782.40912.247441.716938@hergotha.csail.mit.edu> <495EB69F.8010203@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <495EB69F.8010203@elischer.org> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Doug Barton , Garrett Wollman , src-committers@FreeBSD.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 03:14:26 -0000 On Fri, Jan 02, 2009 at 04:51:43PM -0800, Julian Elischer wrote: > I 'm always pissed off that I have to type 'i' so many times. .. > I spend 10 minutes hitting i i i q i i i i i q i q i > (the q is for less or more or whaterver the pager is) I would Dillon's change to avoid all the 'q's could come back. After a screen full of diff, you get prompted what to do - if you want to see the entire diff you have ask for it. Not have to needlessly scroll thru pages and pages of stuff just to hit 'i'. -- -- David (obrien@FreeBSD.org) From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 03:55:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34518106566B; Sat, 3 Jan 2009 03:55:28 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-bw0-f19.google.com (mail-bw0-f19.google.com [209.85.218.19]) by mx1.freebsd.org (Postfix) with ESMTP id 1C8B08FC17; Sat, 3 Jan 2009 03:55:26 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by bwz12 with SMTP id 12so17815458bwz.19 for ; Fri, 02 Jan 2009 19:55:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=TCHBHijlDDuyQ0EETIuC36mYDtNz6KxmiJcU4cnNTSA=; b=QOudIvx1KAGHSEWdVFtTlHHZnxSJBuXCpI1WvxczKFFXnwZayaYoYCjCW/puFxlfpV x3GOv5dXAkYlUjYPtWOA+E5tXktJfdIPCFxG43JPooTnCV3l+cchqgYPNwz/idETcT2E 4p9AT+5/3rvAzKPUQ9NAySDbFnH51CCjo1Rec= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=ArAf51vjfzqy7kMK2W17ObG24De228OdaM9uflYDEAkZeEwDKAuWNyoeuxTj/snih0 Vpzbeu+qcfbNj6TpAmwg/zfXwBcMUwL7cteA2SmhJVrynhEVjNMj5BP9C9Zo8a8cVGpU PsK4hh2KTSf8M2tQcNy720yMoK+DJtU/Ipyn4= Received: by 10.181.20.13 with SMTP id x13mr7105229bki.164.1230954925635; Fri, 02 Jan 2009 19:55:25 -0800 (PST) Received: by 10.180.208.17 with HTTP; Fri, 2 Jan 2009 19:55:25 -0800 (PST) Message-ID: <9bbcef730901021955s254b2eb5j24f93127e84fb5ee@mail.gmail.com> Date: Sat, 3 Jan 2009 04:55:25 +0100 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Doug Barton" In-Reply-To: <495E9E4B.8030905@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> X-Google-Sender-Auth: 8b0cee11fb6713c2 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Garrett Wollman Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 03:55:28 -0000 2009/1/3 Doug Barton : > Garrett Wollman wrote: >> < said: >> >>> As I said in my first post, if there is overwhelming demand for this >>> down the road that is not met by the existing solutions I'll consider >>> adding a better implementation as an option, off by default. >> >> It would be much better if the options that *nearly every user will >> want to use* are set correctly by default. > > 1. Past experience indicates that your average _developer_ is not very > good at estimating what the average _user_ will want as the default. > 2. The needs of developers are considerably different than the needs > of the average user. And just how can upgrading all the non-user-modified files cause serious damage here (serious=system not bootable, login not possible, etc)? Please explain with examples, since from this and the old current@ thread I only got the impression that "it's baaaad, m'kay". Note that regular users will not upgrade -CURRENT, and most won't even upgrade -STABLE, but will go from one -RELEASE to another. Speaking for myself, mergemaster is a source of constant irritation because it doesn't do auto-upgrades by default, and I'm often tempted to just not start it rather than going through 15 minutes of "q, i, " (my pages is less, thus the "q"). If you're so against this option, may I propose something that could satisfy both camps: make a symlink to mergemaster, call it "auto-mergemaster", detect the called name from within the script, then enable autoupgrades if it matches "auto-mergemaster" (as well as possibly other features that make it less verbose and less user-input intensive). Do this as a service to the community and create yourself the possibility of telling us "I told you so"! I'm pretty much sure that users will eventually forget there's a manual "mergemaster" but it will still be available for users used to the old semantics. Your response, please? > 4. I have said literally from day 1 that mergemaster should not ever > change a file on a user's system without them taking an affirmative > step for it to do so. Whether you agree with that idea or not, it is > an expectation that I do not want to mess with. Please consider that the user climate has changed from "day 1". > Given the number of help requests I get for mergemaster that are > already answered in the man page, I do not regard this as all that big > of a problem. :) But seriously folks, have you read all the way down > to the part about the ability to use an rc file to store your commonly > used options? Thanks for this, I didn't know about the rc file, but I see two problems with it: 1) The example in the man page doesn't say how to enable "-U" mode (reading on 7.1-stable) 2) This means I have to copy yet another file to my newly installed systems, and I think I'm not the only one who does this and would like to avoid another file. I install new systems from CDs fairly often, and the list currently includes about a dozen files (tcsh rc files, cvsup files, vim rc, etc.). From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 06:03:06 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDB01106566C for ; Sat, 3 Jan 2009 06:03:06 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outH.internet-mail-service.net (outh.internet-mail-service.net [216.240.47.231]) by mx1.freebsd.org (Postfix) with ESMTP id A4BE78FC17 for ; Sat, 3 Jan 2009 06:03:06 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id EE2B02376; Fri, 2 Jan 2009 22:03:05 -0800 (PST) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 40C882D600D; Fri, 2 Jan 2009 22:03:05 -0800 (PST) Message-ID: <495EFF98.8080701@elischer.org> Date: Fri, 02 Jan 2009 22:03:04 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Ivan Voras References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> <9bbcef730901021955s254b2eb5j24f93127e84fb5ee@mail.gmail.com> In-Reply-To: <9bbcef730901021955s254b2eb5j24f93127e84fb5ee@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Doug Barton , src-committers@freebsd.org, Garrett Wollman Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 06:03:07 -0000 Ivan Voras wrote: > > And just how can upgrading all the non-user-modified files cause > serious damage here (serious=system not bootable, login not possible, > etc)? Please explain with examples, since from this and the old > current@ thread I only got the impression that "it's baaaad, m'kay". > Note that regular users will not upgrade -CURRENT, and most won't even > upgrade -STABLE, but will go from one -RELEASE to another. Speaking > for myself, mergemaster is a source of constant irritation because it > doesn't do auto-upgrades by default, and I'm often tempted to just not > start it rather than going through 15 minutes of "q, i, " (my > pages is less, thus the "q"). Not to mention the times when it seems some large number of files get a change in CVS ID or whatever for some reason (and no other change (for example someone put a tem change in some subset of the rc.d files and then removed it) which seems to happen regularly, then you have to go i i i i i i i i i i i i i i i for 10 minutes, and then you get into finger-typeahead and it then goes right past the one file you DIDN'T want to change and you have lost /etc/master.passwd or something. I really like Mergemaster but it needs options like the one you just removed to make it livable. The -U option goes part way towards this.. How does it know what files have not been user modified? Does it store hashes from the last run somewhere? From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 07:26:06 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4566106564A; Sat, 3 Jan 2009 07:26:06 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 982E18FC19; Sat, 3 Jan 2009 07:26:06 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.28.129] (d75-157-251-204.bchsia.telus.net [75.157.251.204]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id n037PqLA065108 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Jan 2009 23:25:53 -0800 (PST) (envelope-from sobomax@FreeBSD.org) Message-ID: <495F12FE.8080204@FreeBSD.org> Date: Fri, 02 Jan 2009 23:25:50 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Doug Barton References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> In-Reply-To: <495E9E4B.8030905@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Garrett Wollman Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 07:26:07 -0000 Doug Barton wrote: > 1. Past experience indicates that your average _developer_ is not very > good at estimating what the average _user_ will want as the default. This statement is pretty much self-contradictory. You are saying that average developer is very bad at estimating which behavior should be the default, yet you ("average developer") is vetoing features that users (myself and others) report to be very useful. I don't have much time to spend on this issue, but I really think you should release mergemaster from strong maintainership lock and let community lead it future development, especially considering that you have confessed to not having much time to devote to it these days. -Maxim From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 07:57:52 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 314D4106566C; Sat, 3 Jan 2009 07:57:52 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-bw0-f19.google.com (mail-bw0-f19.google.com [209.85.218.19]) by mx1.freebsd.org (Postfix) with ESMTP id EDE858FC16; Sat, 3 Jan 2009 07:57:50 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: by bwz12 with SMTP id 12so17917754bwz.19 for ; Fri, 02 Jan 2009 23:57:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=+WYpDz9hAZNU5hy7qqgu+gGNQ1tHPfJz5evXiRftXU4=; b=xBJEAj1vLkGuF5R10/i49MtEf0YND07IwXzoVjgmMiTN0D2maktpzgV0IdDD9xyNbg Dgh7Ws5mG/SKXV5cv/PAnNmKBUnccfoBkXrDZpojdBbFieh7ZCgPPjf8hnqZh1q52Fls aC01W2wuv2Y+4jzIjqAlknhPEFgB9GbY8Leac= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=rynXtnx10RGssK0vKSaRy2IsakQ27NywXkpSvhKM5FX/s9KzSrTK0ZE+aePfJIgb1p gzKqlO4Xbg+/3+1H2Vaz2+hNdF4GFfs7TCP64MFTAYtKNH9MqDl+uS1ABWP0D9x7wdk3 MCbAbMZUSEQMasajuwDwN/Q1j9RE9y1GHPhSg= Received: by 10.181.209.1 with SMTP id l1mr7176775bkq.139.1230969469506; Fri, 02 Jan 2009 23:57:49 -0800 (PST) Received: by 10.180.208.17 with HTTP; Fri, 2 Jan 2009 23:57:49 -0800 (PST) Message-ID: <9bbcef730901022357l1dc9205ahfa7db117e5aceb2a@mail.gmail.com> Date: Sat, 3 Jan 2009 08:57:49 +0100 From: "Ivan Voras" Sender: ivoras@gmail.com To: "Julian Elischer" In-Reply-To: <495EFF98.8080701@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> <9bbcef730901021955s254b2eb5j24f93127e84fb5ee@mail.gmail.com> <495EFF98.8080701@elischer.org> X-Google-Sender-Auth: 43f7c1006396ea80 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Doug Barton , src-committers@freebsd.org, Garrett Wollman Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 07:57:52 -0000 2009/1/3 Julian Elischer : > Ivan Voras wrote: > >> >> And just how can upgrading all the non-user-modified files cause >> serious damage here (serious=system not bootable, login not possible, >> etc)? Please explain with examples, since from this and the old >> current@ thread I only got the impression that "it's baaaad, m'kay". >> Note that regular users will not upgrade -CURRENT, and most won't even >> upgrade -STABLE, but will go from one -RELEASE to another. Speaking >> for myself, mergemaster is a source of constant irritation because it >> doesn't do auto-upgrades by default, and I'm often tempted to just not >> start it rather than going through 15 minutes of "q, i, " (my >> pages is less, thus the "q"). > > Not to mention the times when it seems some large number of files > get a change in CVS ID or whatever for some reason (and no other change (for > example someone put a tem change in some subset of > the rc.d files and then removed it) which seems to happen > regularly, then you have to go i i i i i i i i i i i i i i i > for 10 minutes, and then you get into finger-typeahead and > it then goes right past the one file you DIDN'T want to change > and you have lost /etc/master.passwd or something. Yes, I completely forgot to rant about the typeahead problem :) On the other hand, this might point to a user-interface problem. Maybe if instead of constantly requesting user input it could be modified to work differently - maybe it could generate a machine readable report of files and autoload it in $EDITOR, in which the user could mark the files en masse (in some easy way, for example by killing the lines containing filenames he doesn't want to upgrade, prepending filenames with "m" for merging, etc), which would then be processed by the script? But again this would save irritation only if there's a quick way to specify "just upgrade everything that wasn't changed by the user". > The -U option goes part way towards this.. How does it know what files > have not been user modified? Does it store hashes from the last run > somewhere? I think that's what /var/db/mergemaster.mtree is used for. From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 08:42:19 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F8761065674; Sat, 3 Jan 2009 08:42:19 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id 8BAE58FC1A; Sat, 3 Jan 2009 08:42:18 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so2969955ywe.13 for ; Sat, 03 Jan 2009 00:42:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:cc:x-mailer; bh=Ts6MiySHIzVEznAZ3aCefm7lOQIkchlTOy3/brTduPo=; b=VZt6yP5oE3VwfyTkaM3JihNerbM7CVeu5apwVJC44HG8Chelykcp6/L02g5iImMxbz gEH70ksooZRqQY+42zNNM8y4SP0CBWm2VNurK2bi5TXc+ruWltwP4tj+GgZ1gOKK9u2P R7VZp2yP3XqJ9dZQj4fXCxpKi8loyKGhV/nzU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:cc:x-mailer; b=gHt/0OexJx0DSId0Ch3Tj6Ftf/zwnbuo5WwE6BvKa/2PZr1tAZZO7BcHu67lxUwVvQ 3kC2vZ9uhch1nxjmG7bz1PQjVopw7ELwGCXJAbb2azXqcuT61PuhIau8s9XgWpP34By5 jerj1c4iW5KKbZAWBqE2kNZRjUxCKNTP3V9hA= Received: by 10.100.165.5 with SMTP id n5mr10172045ane.129.1230972137732; Sat, 03 Jan 2009 00:42:17 -0800 (PST) Received: from ?10.93.135.17? ([32.158.165.165]) by mx.google.com with ESMTPS id c9sm32893674ana.39.2009.01.03.00.42.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 03 Jan 2009 00:42:16 -0800 (PST) References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> <495F12FE.8080204@FreeBSD.org> Message-Id: From: Garrett Cooper To: Maxim Sobolev In-Reply-To: <495F12FE.8080204@FreeBSD.org> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (iPhone Mail 5G77) Date: Sat, 3 Jan 2009 00:03:27 -0800 X-Mailer: iPhone Mail (5G77) Cc: "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" , Doug Barton , Garrett Wollman , "src-committers@FreeBSD.org" Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 08:42:19 -0000 On Jan 2, 2009, at 23:25, Maxim Sobolev wrote: > Doug Barton wrote: >> 1. Past experience indicates that your average _developer_ is not >> very >> good at estimating what the average _user_ will want as the default. > > This statement is pretty much self-contradictory. You are saying > that average developer is very bad at estimating which behavior > should be the default, yet you ("average developer") is vetoing > features that users (myself and others) report to be very useful. It's not to say that doug is claiming that developers are incompetent when determining user needs. Users are a very complex group and that is partly why test engineers and quality engineers exist; to help provide another pov on how software could be defined for more audiences' benefit. Just some food for thought from my perspective.. -Garrett From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 10:14:02 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F8D0106564A; Sat, 3 Jan 2009 10:14:02 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 283078FC1D; Sat, 3 Jan 2009 10:14:02 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n03AE27u022462; Sat, 3 Jan 2009 10:14:02 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n03AE1lA022458; Sat, 3 Jan 2009 10:14:01 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <200901031014.n03AE1lA022458@svn.freebsd.org> From: "David E. O'Brien" Date: Sat, 3 Jan 2009 10:14:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186713 - head/usr.bin/make X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 10:14:02 -0000 Author: obrien Date: Sat Jan 3 10:14:01 2009 New Revision: 186713 URL: http://svn.freebsd.org/changeset/base/186713 Log: + Add the -Q be-quiet flag for parallel jobs. - Enable -Q by default for the moment - there is something weird going on in the rescue build. Modified: head/usr.bin/make/globals.h head/usr.bin/make/job.c head/usr.bin/make/main.c head/usr.bin/make/make.1 head/usr.bin/make/var.c Modified: head/usr.bin/make/globals.h ============================================================================== --- head/usr.bin/make/globals.h Sat Jan 3 05:32:37 2009 (r186712) +++ head/usr.bin/make/globals.h Sat Jan 3 10:14:01 2009 (r186713) @@ -76,6 +76,7 @@ extern Boolean compatMake; /* True if we extern Boolean ignoreErrors; /* True if should ignore all errors */ extern Boolean beSilent; /* True if should print no commands */ extern Boolean beVerbose; /* True if should print extra cruft */ +extern Boolean beQuiet; /* True if want quiet headers with -j */ extern Boolean noExecute; /* True if should execute nothing */ extern Boolean allPrecious; /* True if every target is precious */ extern Boolean is_posix; /* .POSIX target seen */ Modified: head/usr.bin/make/job.c ============================================================================== --- head/usr.bin/make/job.c Sat Jan 3 05:32:37 2009 (r186712) +++ head/usr.bin/make/job.c Sat Jan 3 10:14:01 2009 (r186713) @@ -2363,7 +2363,7 @@ Job_Init(int maxproc) lastNode = NULL; - if (maxJobs == 1 && fifoFd < 0) { + if ((maxJobs == 1 && fifoFd < 0) || beQuiet || beVerbose == 0) { /* * If only one job can run at a time, there's no need for a * banner, no is there? Modified: head/usr.bin/make/main.c ============================================================================== --- head/usr.bin/make/main.c Sat Jan 3 05:32:37 2009 (r186712) +++ head/usr.bin/make/main.c Sat Jan 3 10:14:01 2009 (r186713) @@ -126,6 +126,7 @@ Boolean is_posix; /* .POSIX target seen Boolean mfAutoDeps; /* .MAKEFILEDEPS target seen */ Boolean beSilent; /* -s flag */ Boolean beVerbose; /* -v flag */ +Boolean beQuiet = TRUE; /* -Q flag */ Boolean compatMake; /* -B argument */ int debug; /* -d flag */ Boolean ignoreErrors; /* -i flag */ @@ -370,7 +371,7 @@ MainParseArgs(int argc, char **argv) rearg: optind = 1; /* since we're called more than once */ optreset = 1; -#define OPTFLAGS "ABC:D:E:I:PSV:Xd:ef:ij:km:npqrstvx:" +#define OPTFLAGS "ABC:D:E:I:PSV:Xd:ef:ij:km:nQpqrstvx:" for (;;) { if ((optind < argc) && strcmp(argv[optind], "--") == 0) { found_dd = TRUE; @@ -516,6 +517,10 @@ rearg: printGraphOnly = TRUE; debug |= DEBUG_GRAPH1; break; + case 'Q': + beQuiet = TRUE; + MFLAGS_append("-Q", NULL); + break; case 'q': queryFlag = TRUE; /* Kind of nonsensical, wot? */ @@ -535,6 +540,7 @@ rearg: break; case 'v': beVerbose = TRUE; + beQuiet = FALSE; MFLAGS_append("-v", NULL); break; case 'x': Modified: head/usr.bin/make/make.1 ============================================================================== --- head/usr.bin/make/make.1 Sat Jan 3 05:32:37 2009 (r186712) +++ head/usr.bin/make/make.1 Sat Jan 3 10:14:01 2009 (r186713) @@ -258,6 +258,9 @@ When combined with only the builtin rules of .Nm are displayed. +.It Fl Q +Be extra quiet. +For multi-job makes, this will cause file banners not to be generated. .It Fl q Do not execute any commands, but exit 0 if the specified targets are up-to-date and 1, otherwise. @@ -289,7 +292,7 @@ the variables will be printed one per li with a blank line for each null or undefined variable. .It Fl v Be extra verbose. -For multi-job makes, this will cause file banners to be generated. +Print any extra information. .It Fl X When using the .Fl V Modified: head/usr.bin/make/var.c ============================================================================== --- head/usr.bin/make/var.c Sat Jan 3 05:32:37 2009 (r186712) +++ head/usr.bin/make/var.c Sat Jan 3 10:14:01 2009 (r186713) @@ -946,12 +946,14 @@ VarFindAny(const char name[], GNode *ctx * The name and val arguments are duplicated so they may * safely be freed. */ -static void +static Var * VarAdd(const char *name, const char *val, GNode *ctxt) { + Var *v; - Lst_AtFront(&ctxt->context, VarCreate(name, val, 0)); + Lst_AtFront(&ctxt->context, v = VarCreate(name, val, 0)); DEBUGF(VAR, ("%s:%s = %s\n", ctxt->name, name, val)); + return (v); } /** @@ -1004,30 +1006,22 @@ Var_Set(const char *name, const char *va n = VarPossiblyExpand(name, ctxt); v = VarFindOnly(n, ctxt); if (v == NULL) { - VarAdd(n, val, ctxt); - if (ctxt == VAR_CMD) { - /* - * Any variables given on the command line - * are automatically exported to the - * environment (as per POSIX standard) - */ - setenv(n, val, 1); - } + v = VarAdd(n, val, ctxt); } else { Buf_Clear(v->val); Buf_Append(v->val, val); - - if (ctxt == VAR_CMD || (v->flags & VAR_TO_ENV)) { - /* - * Any variables given on the command line - * are automatically exported to the - * environment (as per POSIX standard) - */ - setenv(n, val, 1); - } DEBUGF(VAR, ("%s:%s = %s\n", ctxt->name, n, val)); } + if (ctxt == VAR_CMD || (v->flags & VAR_TO_ENV)) { + /* + * Any variables given on the command line + * are automatically exported to the + * environment (as per POSIX standard) + */ + setenv(n, val, 1); + } + free(n); } @@ -2325,7 +2319,8 @@ match_var(const char str[], const char v * None. The old string must be freed by the caller */ Buffer * -Var_Subst(const char *str, GNode *ctxt, Boolean err) +//Var_Subst(const char *var, const char *str, GNode *ctxt, Boolean undefErr) +Var_Subst( const char *str, GNode *ctxt, Boolean err) { Boolean errorReported; Buffer *buf; /* Buffer for forming things */ From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 10:24:14 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F24B106566C; Sat, 3 Jan 2009 10:24:14 +0000 (UTC) (envelope-from rik@inse.ru) Received: from mail.inse.ru (mail.inse.ru [144.206.128.1]) by mx1.freebsd.org (Postfix) with ESMTP id 43D898FC12; Sat, 3 Jan 2009 10:24:14 +0000 (UTC) (envelope-from rik@inse.ru) Received: from www.inse.ru (www.inse.ru [144.206.128.1]) by mail.inse.ru (Postfix) with ESMTPSA id DF98C33C51; Sat, 3 Jan 2009 13:24:12 +0300 (MSK) Message-ID: <495F3CE1.5070800@localhost.inse.ru> Date: Sat, 03 Jan 2009 13:24:33 +0300 From: Roman Kurakin User-Agent: Thunderbird 2.0.0.16 (X11/20080723) MIME-Version: 1.0 To: Ivan Voras References: <200901011055.n01AtQaN052763@svn.freebsd.org> <495DB15B.8040908@FreeBSD.org> <495DB9B6.4030801@FreeBSD.org> <495DC5AF.3050908@FreeBSD.org> <495E91F8.3010706@FreeBSD.org> <18782.37537.775290.682466@hergotha.csail.mit.edu> <495E9E4B.8030905@FreeBSD.org> <9bbcef730901021955s254b2eb5j24f93127e84fb5ee@mail.gmail.com> <495EFF98.8080701@elischer.org> <9bbcef730901022357l1dc9205ahfa7db117e5aceb2a@mail.gmail.com> In-Reply-To: <9bbcef730901022357l1dc9205ahfa7db117e5aceb2a@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Doug Barton , svn-src-all@freebsd.org, Garrett Wollman , src-committers@freebsd.org, Julian Elischer , svn-src-head@freebsd.org Subject: Re: svn: head/usr.sbin/mergemaster X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 10:24:15 -0000 Ivan Voras wrote: > 2009/1/3 Julian Elischer : > >> Ivan Voras wrote: >> >> >>> And just how can upgrading all the non-user-modified files cause >>> serious damage here (serious=system not bootable, login not possible, >>> etc)? Please explain with examples, since from this and the old >>> current@ thread I only got the impression that "it's baaaad, m'kay". >>> Note that regular users will not upgrade -CURRENT, and most won't even >>> upgrade -STABLE, but will go from one -RELEASE to another. Speaking >>> for myself, mergemaster is a source of constant irritation because it >>> doesn't do auto-upgrades by default, and I'm often tempted to just not >>> start it rather than going through 15 minutes of "q, i, " (my >>> pages is less, thus the "q"). >>> >> Not to mention the times when it seems some large number of files >> get a change in CVS ID or whatever for some reason (and no other change (for >> example someone put a tem change in some subset of >> the rc.d files and then removed it) which seems to happen >> regularly, then you have to go i i i i i i i i i i i i i i i >> for 10 minutes, and then you get into finger-typeahead and >> it then goes right past the one file you DIDN'T want to change >> and you have lost /etc/master.passwd or something. >> > > Yes, I completely forgot to rant about the typeahead problem :) > > On the other hand, this might point to a user-interface problem. Maybe > if instead of constantly requesting user input it could be modified to > work differently - maybe it could generate a machine readable report > of files and autoload it in $EDITOR, in which the user could mark the > files en masse (in some easy way, for example by killing the lines > containing filenames he doesn't want to upgrade, prepending filenames > with "m" for merging, etc), which would then be processed by the > script? But again this would save irritation only if there's a quick > way to specify "just upgrade everything that wasn't changed by the > user". > The better way would be to specify path_to_cvs and do three way merging. >> The -U option goes part way towards this.. How does it know what files >> have not been user modified? Does it store hashes from the last run >> somewhere? >> > > I think that's what /var/db/mergemaster.mtree is used for. > From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 10:37:39 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45D3A106568C; Sat, 3 Jan 2009 10:37:39 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CD198FC60; Sat, 3 Jan 2009 10:37:39 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n03AbdWn025537; Sat, 3 Jan 2009 10:37:39 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n03AbdOG025536; Sat, 3 Jan 2009 10:37:39 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200901031037.n03AbdOG025536@svn.freebsd.org> From: Christian Brueffer Date: Sat, 3 Jan 2009 10:37:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186714 - head/share/man/man9 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 10:37:41 -0000 Author: brueffer Date: Sat Jan 3 10:37:38 2009 New Revision: 186714 URL: http://svn.freebsd.org/changeset/base/186714 Log: Mdoc and language cleanup. Modified: head/share/man/man9/dev_clone.9 Modified: head/share/man/man9/dev_clone.9 ============================================================================== --- head/share/man/man9/dev_clone.9 Sat Jan 3 10:14:01 2009 (r186713) +++ head/share/man/man9/dev_clone.9 Sat Jan 3 10:37:38 2009 (r186714) @@ -24,7 +24,9 @@ .\" .\" $FreeBSD$ .\" -.Dd September 8, 2008 +.Dd January 3, 2009 +.Dt DEV_CLONE 9 +.Os .Sh NAME .Nm dev_clone , .Nm drain_dev_clone_events @@ -40,11 +42,11 @@ EVENTHANDLER_REGISTER(dev_clone, clone_h .Ft void .Fn drain_dev_clone_events .Sh DESCRIPTION -Device driver may register a listener that will be notified each time -name lookup on the -.Xr devfs +A device driver may register a listener that will be notified each time +a name lookup on the +.Xr devfs 5 mount point fails to find the vnode. -Listener shall be registered for the +A listener shall be registered for the .Va dev_clone event. When called, it is supplied with the first argument @@ -52,23 +54,25 @@ When called, it is supplied with the fir that was specified at handler registration time, appropriate credentials .Va cr , +and a name .Va name -of the length +of length .Va namelen -that was looked for. -If handler decides that the name is appropriate and want to create device -that will be associated with the name, it should return it to the devfs +that we look for. +If the handler decides that the name is appropriate and wants to create the device +that will be associated with the name, it should return it to devfs in the -.Va dev . +.Va dev +argument. .Pp The .Fn drain_dev_clone_events function is a barrier. -It is guaranteed that all calls to eventhandlers for dev_clone that were -started before +It is guaranteed that all calls to eventhandlers for +.Nm dev_clone +that were started before .Fn drain_dev_clone_events call, are finished before it returns control. -.Pp .Sh SEE ALSO .Xr devfs 5 , .Xr namei 9 From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 10:56:12 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 364B71065670; Sat, 3 Jan 2009 10:56:12 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 244F08FC0C; Sat, 3 Jan 2009 10:56:12 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n03AuA6h025990; Sat, 3 Jan 2009 10:56:10 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n03AuAfG025989; Sat, 3 Jan 2009 10:56:10 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200901031056.n03AuAfG025989@svn.freebsd.org> From: Christian Brueffer Date: Sat, 3 Jan 2009 10:56:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186715 - head/sys/dev/pcn X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 10:56:12 -0000 Author: brueffer Date: Sat Jan 3 10:56:10 2009 New Revision: 186715 URL: http://svn.freebsd.org/changeset/base/186715 Log: Call pcn_start_locked() instead of pcn_start() where the softc lock is already held. Approved by: rwatson (mentor) MFC after: 3 weeks Modified: head/sys/dev/pcn/if_pcn.c Modified: head/sys/dev/pcn/if_pcn.c ============================================================================== --- head/sys/dev/pcn/if_pcn.c Sat Jan 3 10:37:38 2009 (r186714) +++ head/sys/dev/pcn/if_pcn.c Sat Jan 3 10:56:10 2009 (r186715) @@ -1446,7 +1446,7 @@ pcn_watchdog(ifp) pcn_init_locked(sc); if (ifp->if_snd.ifq_head != NULL) - pcn_start(ifp); + pcn_start_locked(ifp); PCN_UNLOCK(sc); From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 11:22:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27A9E106564A; Sat, 3 Jan 2009 11:22:03 +0000 (UTC) (envelope-from jeremie@le-hen.org) Received: from postfix2-g20.free.fr (postfix2-g20.free.fr [212.27.60.43]) by mx1.freebsd.org (Postfix) with ESMTP id AF2458FC12; Sat, 3 Jan 2009 11:22:02 +0000 (UTC) (envelope-from jeremie@le-hen.org) Received: from smtp1-g21.free.fr (smtp1-g21.free.fr [212.27.42.1]) by postfix2-g20.free.fr (Postfix) with ESMTP id 9ADAC2E857D0; Sat, 3 Jan 2009 09:54:41 +0100 (CET) Received: from smtp1-g21.free.fr (localhost [127.0.0.1]) by smtp1-g21.free.fr (Postfix) with ESMTP id 1E976940161; Sat, 3 Jan 2009 11:54:43 +0100 (CET) Received: from endor.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp1-g21.free.fr (Postfix) with ESMTP id 39B8094000E; Sat, 3 Jan 2009 11:54:41 +0100 (CET) Received: from obiwan.tataz.chchile.org (endor.tataz.chchile.org [192.168.1.25]) by endor.tataz.chchile.org (Postfix) with ESMTP id 9436FCD970; Sat, 3 Jan 2009 11:54:15 +0100 (CET) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 7D29F405B; Sat, 3 Jan 2009 11:54:15 +0100 (CET) Date: Sat, 3 Jan 2009 11:54:15 +0100 From: Jeremie Le Hen To: Alexander Motin Message-ID: <20090103105415.GA40686@obiwan.tataz.chchile.org> References: <200811181324.mAIDOcOc079096@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200811181324.mAIDOcOc079096@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r185050 - head/usr.sbin/powerd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 11:22:03 -0000 Hi Alexander, On Tue, Nov 18, 2008 at 01:24:38PM +0000, Alexander Motin wrote: > Author: mav > Date: Tue Nov 18 13:24:38 2008 > New Revision: 185050 > URL: http://svn.freebsd.org/changeset/base/185050 > > Log: > Set of powerd enchancements: > > 1. Make it more SMP polite. Previous version uses average CPU load that > often leads to load underestimation. It make powerd with default > configuration unusable on systems with more then 2 CPUs. I propose to use > summary load instead of average one. IMO this is the best we can do without > specially tuned scheduler. Also as soon as measuring total load on SMP > systems is more useful then total idle, I have switched to it. > > 2. Make powerd's operation independent from number and size of frequency > levels. I have added internal frequency counter which translated into real > frequencies only on a last stage and only as good as gone. Some systems may > have only several power levels, while others - many of them, so adaptation > time with previous approach was completely different. > > 3. As part of previous I have changed adaptive mode to rise frequency on > demand up to 2 times and fall on 1/8 per time internal. > > 4. For desktop (AC-powered) systems I have added one more mode - "hiadaptive". > It rises frequency twice faster, drops it 4 times slower, prefers twice > lower CPU load and has additional delay before leaving the highest frequency > after the period of maximum load. This mode was specially made to improve > interactivity of the systems where operation capabilities are more > significant then power consumption, but keeping maximum frequency all the > time is not needed. > > 5. I have reduced default polling interval from 1/2 to 1/4 of second. > It is not so important for algorithm math now, but gives better system > interactivity. Thanks for this work! Can you consider MFC'ing this to RELENG_7 and maybe RELENG_6 please? Thanks. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org > From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 11:25:50 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCAFE1065673; Sat, 3 Jan 2009 11:25:50 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8E528FC17; Sat, 3 Jan 2009 11:25:50 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n03BPo1G026549; Sat, 3 Jan 2009 11:25:50 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n03BPoEg026547; Sat, 3 Jan 2009 11:25:50 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <200901031125.n03BPoEg026547@svn.freebsd.org> From: Antoine Brodin Date: Sat, 3 Jan 2009 11:25:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186716 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 11:25:54 -0000 Author: antoine Date: Sat Jan 3 11:25:50 2009 New Revision: 186716 URL: http://svn.freebsd.org/changeset/base/186716 Log: Add an obsolete file. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Jan 3 10:56:10 2009 (r186715) +++ head/ObsoleteFiles.inc Sat Jan 3 11:25:50 2009 (r186716) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20081223: bind 9.4.3 import, nsupdate.8 moved to nsupdate.1 +OLD_FILES+=usr/share/man/man8/nsupdate.8.gz # 20081223: ipprotosw.h removed OLD_FILES+=usr/include/netinet/ipprotosw.h # 20081123: vfs_mountedon.9 removed From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 11:35:31 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD185106566C; Sat, 3 Jan 2009 11:35:31 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB8238FC1B; Sat, 3 Jan 2009 11:35:31 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n03BZVPO026767; Sat, 3 Jan 2009 11:35:31 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n03BZVDB026766; Sat, 3 Jan 2009 11:35:31 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200901031135.n03BZVDB026766@svn.freebsd.org> From: Robert Watson Date: Sat, 3 Jan 2009 11:35:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186717 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 11:35:32 -0000 Author: rwatson Date: Sat Jan 3 11:35:31 2009 New Revision: 186717 URL: http://svn.freebsd.org/changeset/base/186717 Log: Allow the IP_MINTTL socket option to be set to 0 so that it can be disabled entirely, which is its default state before set to a non-zero value. PR: 128790 Submitted by: Nick Hilliard MFC after: 3 weeks Modified: head/sys/netinet/ip_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Sat Jan 3 11:25:50 2009 (r186716) +++ head/sys/netinet/ip_output.c Sat Jan 3 11:35:31 2009 (r186717) @@ -892,7 +892,7 @@ ip_ctloutput(struct socket *so, struct s break; case IP_MINTTL: - if (optval > 0 && optval <= MAXTTL) + if (optval >= 0 && optval <= MAXTTL) inp->inp_ip_minttl = optval; else error = EINVAL; From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 13:24:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 940AC1065673; Sat, 3 Jan 2009 13:24:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82F678FC14; Sat, 3 Jan 2009 13:24:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n03DO9C9028835; Sat, 3 Jan 2009 13:24:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n03DO921028832; Sat, 3 Jan 2009 13:24:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200901031324.n03DO921028832@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 3 Jan 2009 13:24:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186719 - in head/sys: kern vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 13:24:10 -0000 Author: kib Date: Sat Jan 3 13:24:08 2009 New Revision: 186719 URL: http://svn.freebsd.org/changeset/base/186719 Log: Extend the struct vm_page wire_count to u_int to avoid the overflow of the counter, that may happen when too many sendfile(2) calls are being executed with this vnode [1]. To keep the size of the struct vm_page and offsets of the fields accessed by out-of-tree modules, swap the types and locations of the wire_count and cow fields. Add safety checks to detect cow overflow and force fallback to the normal copy code for zero-copy sockets. [2] Reported by: Anton Yuzhaninov [1] Suggested by: alc [2] Reviewed by: alc MFC after: 2 weeks Modified: head/sys/kern/uipc_cow.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h Modified: head/sys/kern/uipc_cow.c ============================================================================== --- head/sys/kern/uipc_cow.c Sat Jan 3 12:09:18 2009 (r186718) +++ head/sys/kern/uipc_cow.c Sat Jan 3 13:24:08 2009 (r186719) @@ -129,7 +129,11 @@ socow_setup(struct mbuf *m0, struct uio * set up COW */ vm_page_lock_queues(); - vm_page_cowsetup(pp); + if (vm_page_cowsetup(pp) != 0) { + vm_page_unhold(pp); + vm_page_unlock_queues(); + return (0); + } /* * wire the page for I/O Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sat Jan 3 12:09:18 2009 (r186718) +++ head/sys/vm/vm_page.c Sat Jan 3 13:24:08 2009 (r186719) @@ -106,6 +106,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -2112,13 +2113,16 @@ vm_page_cowclear(vm_page_t m) */ } -void +int vm_page_cowsetup(vm_page_t m) { mtx_assert(&vm_page_queue_mtx, MA_OWNED); + if (m->cow == USHRT_MAX - 1) + return (EBUSY); m->cow++; pmap_remove_write(m); + return (0); } #include "opt_ddb.h" Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Sat Jan 3 12:09:18 2009 (r186718) +++ head/sys/vm/vm_page.h Sat Jan 3 13:24:08 2009 (r186719) @@ -111,12 +111,12 @@ struct vm_page { vm_paddr_t phys_addr; /* physical address of page */ struct md_page md; /* machine dependant stuff */ uint8_t queue; /* page queue index */ - int8_t segind; + int8_t segind; u_short flags; /* see below */ uint8_t order; /* index of the buddy queue */ uint8_t pool; - u_short wire_count; /* wired down maps refs (P) */ - u_int cow; /* page cow mapping count */ + u_short cow; /* page cow mapping count */ + u_int wire_count; /* wired down maps refs (P) */ short hold_count; /* page hold count */ u_short oflags; /* page flags (O) */ u_char act_count; /* page usage count */ @@ -336,7 +336,7 @@ void vm_page_zero_invalid(vm_page_t m, b void vm_page_free_toq(vm_page_t m); void vm_page_zero_idle_wakeup(void); void vm_page_cowfault (vm_page_t); -void vm_page_cowsetup (vm_page_t); +int vm_page_cowsetup(vm_page_t); void vm_page_cowclear (vm_page_t); /* From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 13:42:50 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2F8D106566C; Sat, 3 Jan 2009 13:42:50 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 863DF8FC08; Sat, 3 Jan 2009 13:42:50 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n03DgoMk029222; Sat, 3 Jan 2009 13:42:50 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n03DgoNp029221; Sat, 3 Jan 2009 13:42:50 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <200901031342.n03DgoNp029221@svn.freebsd.org> From: Kai Wang Date: Sat, 3 Jan 2009 13:42:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186720 - head/sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 13:42:51 -0000 Author: kaiw Date: Sat Jan 3 13:42:49 2009 New Revision: 186720 URL: http://svn.freebsd.org/changeset/base/186720 Log: Added section type SHT_GNU_HASH. GNU-style .hash section is a new style of hash section with better performace than the original SYSV hash. It can be generated by newer binutils. Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Sat Jan 3 13:24:08 2009 (r186719) +++ head/sys/sys/elf_common.h Sat Jan 3 13:42:49 2009 (r186720) @@ -267,6 +267,7 @@ typedef struct { #define SHT_SUNW_dof 0x6ffffff4 #define SHT_SUNW_cap 0x6ffffff5 #define SHT_SUNW_SIGNATURE 0x6ffffff6 +#define SHT_GNU_HASH 0x6ffffff6 #define SHT_SUNW_ANNOTATE 0x6ffffff7 #define SHT_SUNW_DEBUGSTR 0x6ffffff8 #define SHT_SUNW_DEBUG 0x6ffffff9 From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 14:33:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FD81106564A; Sat, 3 Jan 2009 14:33:48 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E4218FC08; Sat, 3 Jan 2009 14:33:48 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n03EXmbh030236; Sat, 3 Jan 2009 14:33:48 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n03EXmYp030235; Sat, 3 Jan 2009 14:33:48 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200901031433.n03EXmYp030235@svn.freebsd.org> From: Marius Strobl Date: Sat, 3 Jan 2009 14:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186722 - head/sys/dev/usb2/controller X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 14:33:49 -0000 Author: marius Date: Sat Jan 3 14:33:48 2009 New Revision: 186722 URL: http://svn.freebsd.org/changeset/base/186722 Log: Reapply the intpin correction part of r146420 which somehow got lost. Modified: head/sys/dev/usb2/controller/ohci2_pci.c Modified: head/sys/dev/usb2/controller/ohci2_pci.c ============================================================================== --- head/sys/dev/usb2/controller/ohci2_pci.c Sat Jan 3 13:55:02 2009 (r186721) +++ head/sys/dev/usb2/controller/ohci2_pci.c Sat Jan 3 14:33:48 2009 (r186722) @@ -211,6 +211,13 @@ ohci_pci_attach(device_t self) pci_enable_busmaster(self); + /* + * Some Sun PCIO-2 USB controllers have their intpin register + * bogusly set to 0, although it should be 4. Correct that. + */ + if (pci_get_devid(self) == 0x1103108e && pci_get_intpin(self) == 0) + pci_set_intpin(self, 4); + rid = PCI_CBMEM; sc->sc_io_res = bus_alloc_resource_any(self, SYS_RES_MEMORY, &rid, RF_ACTIVE); From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 19:38:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FAA0106564A; Sat, 3 Jan 2009 19:38:48 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F09018FC1C; Sat, 3 Jan 2009 19:38:47 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n03Jcl8J036001; Sat, 3 Jan 2009 19:38:47 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n03Jcl4o035993; Sat, 3 Jan 2009 19:38:47 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200901031938.n03Jcl4o035993@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 3 Jan 2009 19:38:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186728 - in head/sys: dev/ofw powerpc/powermac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 19:38:48 -0000 Author: nwhitehorn Date: Sat Jan 3 19:38:47 2009 New Revision: 186728 URL: http://svn.freebsd.org/changeset/base/186728 Log: Fix the OFW interrupt map parser to use its own idea of the number of interrupt cells in the map, instead of using a value passed to it and then panicing if it disagrees. This fixes interrupt map parsing for PCI bridges on some Apple Uninorth PCI controllers. Reported by: marcel Tested on: G4 iBook, Sun Ultra 5 Modified: head/sys/dev/ofw/ofw_bus_subr.c head/sys/dev/ofw/openfirm.c head/sys/dev/ofw/openfirm.h head/sys/powerpc/powermac/grackle.c head/sys/powerpc/powermac/gracklevar.h head/sys/powerpc/powermac/macio.c head/sys/powerpc/powermac/uninorth.c head/sys/powerpc/powermac/uninorthvar.h Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Sat Jan 3 18:51:49 2009 (r186727) +++ head/sys/dev/ofw/ofw_bus_subr.c Sat Jan 3 19:38:47 2009 (r186728) @@ -146,18 +146,6 @@ ofw_bus_gen_get_type(device_t bus, devic return (obd->obd_type); } -static int -ofw_bus_searchprop(phandle_t node, char *propname, void *buf, int buflen) -{ - int rv; - - for (; node != 0; node = OF_parent(node)) { - if ((rv = OF_getprop(node, propname, buf, buflen)) != -1) - return (rv); - } - return (-1); -} - void ofw_bus_setup_iinfo(phandle_t node, struct ofw_bus_iinfo *ii, int intrsz) { @@ -249,17 +237,16 @@ ofw_bus_search_intrmap(void *intr, int i mptr = imap; i = imapsz; - tsz = physsz + intrsz + sizeof(phandle_t) + rintrsz; while (i > 0) { - KASSERT(i >= tsz, ("ofw_bus_search_intrmap: truncated map")); bcopy(mptr + physsz + intrsz, &parent, sizeof(parent)); - if (ofw_bus_searchprop(parent, "#interrupt-cells", + if (OF_searchprop(parent, "#interrupt-cells", &pintrsz, sizeof(pintrsz)) == -1) pintrsz = 1; /* default */ pintrsz *= sizeof(pcell_t); - if (pintrsz != rintrsz) - panic("ofw_bus_search_intrmap: expected interrupt cell " - "size incorrect: %d > %d", rintrsz, pintrsz); + + /* Compute the map stride size */ + tsz = physsz + intrsz + sizeof(phandle_t) + pintrsz; + KASSERT(i >= tsz, ("ofw_bus_search_intrmap: truncated map")); /* * XXX: Apple hardware uses a second cell to set information Modified: head/sys/dev/ofw/openfirm.c ============================================================================== --- head/sys/dev/ofw/openfirm.c Sat Jan 3 18:51:49 2009 (r186727) +++ head/sys/dev/ofw/openfirm.c Sat Jan 3 19:38:47 2009 (r186728) @@ -220,6 +220,23 @@ OF_getprop(phandle_t package, const char } /* + * Resursively search the node and its parent for the given property, working + * downward from the node to the device tree root. Returns the value of the + * first match. + */ +ssize_t +OF_searchprop(phandle_t node, char *propname, void *buf, size_t len) +{ + ssize_t rv; + + for (; node != 0; node = OF_parent(node)) { + if ((rv = OF_getprop(node, propname, buf, len)) != -1) + return (rv); + } + return (-1); +} + +/* * Store the value of a property of a package into newly allocated memory * (using the M_OFWPROP malloc pool and M_WAITOK). elsz is the size of a * single element, the number of elements is return in number. Modified: head/sys/dev/ofw/openfirm.h ============================================================================== --- head/sys/dev/ofw/openfirm.h Sat Jan 3 18:51:49 2009 (r186727) +++ head/sys/dev/ofw/openfirm.h Sat Jan 3 19:38:47 2009 (r186728) @@ -104,6 +104,8 @@ phandle_t OF_parent(phandle_t node); ssize_t OF_getproplen(phandle_t node, const char *propname); ssize_t OF_getprop(phandle_t node, const char *propname, void *buf, size_t len); +ssize_t OF_searchprop(phandle_t node, char *propname, void *buf, + size_t len); ssize_t OF_getprop_alloc(phandle_t node, const char *propname, int elsz, void **buf); int OF_nextprop(phandle_t node, const char *propname, char *buf, Modified: head/sys/powerpc/powermac/grackle.c ============================================================================== --- head/sys/powerpc/powermac/grackle.c Sat Jan 3 18:51:49 2009 (r186727) +++ head/sys/powerpc/powermac/grackle.c Sat Jan 3 19:38:47 2009 (r186728) @@ -165,7 +165,7 @@ static int grackle_attach(device_t dev) { struct grackle_softc *sc; - phandle_t node, iparent; + phandle_t node; u_int32_t busrange[2]; struct grackle_range *rp, *io, *mem[2]; int nmem, i, error; @@ -254,14 +254,6 @@ grackle_attach(device_t dev) ofw_bus_setup_iinfo(node, &sc->sc_pci_iinfo, sizeof(cell_t)); - /* We need the number of interrupt cells to read the imap */ - if (OF_getprop(node, "interrupt-parent", &iparent,sizeof(iparent)) <= 0) - iparent = node; - - if (OF_getprop(iparent,"#interrupt-cells",&sc->sc_icells, - sizeof(sc->sc_icells)) <= 0) - sc->sc_icells = 1; - device_add_child(dev, "pci", device_get_unit(dev)); return (bus_generic_attach(dev)); } @@ -348,15 +340,14 @@ grackle_route_interrupt(device_t bus, de { struct grackle_softc *sc; struct ofw_pci_register reg; - uint32_t pintr, mintr[2]; + uint32_t pintr, mintr; uint8_t maskbuf[sizeof(reg) + sizeof(pintr)]; sc = device_get_softc(bus); pintr = pin; if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, - sizeof(reg), &pintr, sizeof(pintr), &mintr, - sizeof(mintr[0])*sc->sc_icells, maskbuf)) - return (mintr[0]); + sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), maskbuf)) + return (mintr); /* Maybe it's a real interrupt, not an intpin */ if (pin > 4) Modified: head/sys/powerpc/powermac/gracklevar.h ============================================================================== --- head/sys/powerpc/powermac/gracklevar.h Sat Jan 3 18:51:49 2009 (r186727) +++ head/sys/powerpc/powermac/gracklevar.h Sat Jan 3 19:38:47 2009 (r186728) @@ -52,7 +52,6 @@ struct grackle_softc { struct rman sc_mem_rman; bus_space_tag_t sc_memt; bus_dma_tag_t sc_dmat; - int sc_icells; struct ofw_bus_iinfo sc_pci_iinfo; }; Modified: head/sys/powerpc/powermac/macio.c ============================================================================== --- head/sys/powerpc/powermac/macio.c Sat Jan 3 18:51:49 2009 (r186727) +++ head/sys/powerpc/powermac/macio.c Sat Jan 3 19:38:47 2009 (r186728) @@ -185,7 +185,6 @@ macio_add_intr(phandle_t devnode, struct { int *intr; int i, nintr; - phandle_t iparent; int icells; if (dinfo->mdi_ninterrupts >= 6) { @@ -193,10 +192,9 @@ macio_add_intr(phandle_t devnode, struct return; } - icells = 1; - - if (OF_getprop(devnode, "interrupt-parent", &iparent, sizeof(iparent)) == sizeof(iparent)) - OF_getprop(iparent, "#interrupt-cells", &icells, sizeof(icells)); + if (OF_searchprop(devnode, "#interrupt-cells", &icells, sizeof(icells)) + <= 0) + icells = 1; nintr = OF_getprop_alloc(devnode, "interrupts", sizeof(*intr), (void **)&intr); Modified: head/sys/powerpc/powermac/uninorth.c ============================================================================== --- head/sys/powerpc/powermac/uninorth.c Sat Jan 3 18:51:49 2009 (r186727) +++ head/sys/powerpc/powermac/uninorth.c Sat Jan 3 19:38:47 2009 (r186728) @@ -164,7 +164,7 @@ uninorth_attach(device_t dev) { struct uninorth_softc *sc; const char *compatible; - phandle_t node, child, iparent; + phandle_t node, child; u_int32_t reg[2], busrange[2]; struct uninorth_range *rp, *io, *mem[2]; int nmem, i, error; @@ -296,12 +296,6 @@ uninorth_attach(device_t dev) ofw_bus_setup_iinfo(node, &sc->sc_pci_iinfo, sizeof(cell_t)); - /* We need the number of interrupt cells to read the imap */ - sc->sc_icells = 2; - if (OF_getprop(node, "interrupt-parent", &iparent,sizeof(iparent)) > 0) - OF_getprop(iparent,"#interrupt-cells",&sc->sc_icells, - sizeof(sc->sc_icells)); - device_add_child(dev, "pci", device_get_unit(dev)); return (bus_generic_attach(dev)); } @@ -370,15 +364,14 @@ uninorth_route_interrupt(device_t bus, d { struct uninorth_softc *sc; struct ofw_pci_register reg; - uint32_t pintr, mintr[2]; + uint32_t pintr, mintr; uint8_t maskbuf[sizeof(reg) + sizeof(pintr)]; sc = device_get_softc(bus); pintr = pin; if (ofw_bus_lookup_imap(ofw_bus_get_node(dev), &sc->sc_pci_iinfo, ®, - sizeof(reg), &pintr, sizeof(pintr), mintr, - sizeof(mintr[0])*sc->sc_icells, maskbuf)) - return (mintr[0]); + sizeof(reg), &pintr, sizeof(pintr), &mintr, sizeof(mintr), maskbuf)) + return (mintr); /* Maybe it's a real interrupt, not an intpin */ if (pin > 4) Modified: head/sys/powerpc/powermac/uninorthvar.h ============================================================================== --- head/sys/powerpc/powermac/uninorthvar.h Sat Jan 3 18:51:49 2009 (r186727) +++ head/sys/powerpc/powermac/uninorthvar.h Sat Jan 3 19:38:47 2009 (r186728) @@ -64,7 +64,6 @@ struct uninorth_softc { struct ofw_bus_iinfo sc_pci_iinfo; int sc_u3; - int sc_icells; }; struct unin_chip_softc { From owner-svn-src-head@FreeBSD.ORG Sat Jan 3 22:51:55 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 892A7106566C; Sat, 3 Jan 2009 22:51:55 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E0B48FC13; Sat, 3 Jan 2009 22:51:55 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n03MptxX039464; Sat, 3 Jan 2009 22:51:55 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n03MptpH039460; Sat, 3 Jan 2009 22:51:55 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200901032251.n03MptpH039460@svn.freebsd.org> From: Ed Schouten Date: Sat, 3 Jan 2009 22:51:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r186729 - head/sys/dev/syscons/teken X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jan 2009 22:51:56 -0000 Author: ed Date: Sat Jan 3 22:51:54 2009 New Revision: 186729 URL: http://svn.freebsd.org/changeset/base/186729 Log: Resolve some regressions related to tabs and linewrap handling. It turns out I was looking too much at mimicing xterm, that I didn't take the differences of cons25 into account. There are some differences between xterm and cons25 that are important. Create a new #define called TEKEN_CONS25 that can be toggled to switch between cons25 and xterm mode. - Don't forget to redraw the cursor after processing a forward/backward tabulation. - Implement cons25-style (WYSE?) autowrapping. This form of autowrapping isn't that nice. It wraps the cursor when printing something on column 80. xterm wraps when printing the first character that doesn't fit. - In cons25, a \t shouldn't overwrite previous contents, while xterm does. Reported by: Garrett Cooper Modified: head/sys/dev/syscons/teken/teken.c head/sys/dev/syscons/teken/teken.h head/sys/dev/syscons/teken/teken_demo.c head/sys/dev/syscons/teken/teken_subr.h Modified: head/sys/dev/syscons/teken/teken.c ============================================================================== --- head/sys/dev/syscons/teken/teken.c Sat Jan 3 19:38:47 2009 (r186728) +++ head/sys/dev/syscons/teken/teken.c Sat Jan 3 22:51:54 2009 (r186729) @@ -68,7 +68,11 @@ teken_wcwidth(teken_char_t c) #define TS_INSERT 0x02 /* Insert mode. */ #define TS_AUTOWRAP 0x04 /* Autowrap. */ #define TS_ORIGIN 0x08 /* Origin mode. */ +#ifdef TEKEN_CONS25 +#define TS_WRAPPED 0x00 /* Simple line wrapping. */ +#else /* !TEKEN_CONS25 */ #define TS_WRAPPED 0x10 /* Next character should be printed on col 0. */ +#endif /* TEKEN_CONS25 */ /* Character that blanks a cell. */ #define BLANK ' ' Modified: head/sys/dev/syscons/teken/teken.h ============================================================================== --- head/sys/dev/syscons/teken/teken.h Sat Jan 3 19:38:47 2009 (r186728) +++ head/sys/dev/syscons/teken/teken.h Sat Jan 3 22:51:54 2009 (r186729) @@ -43,6 +43,8 @@ */ #define TEKEN_UTF8 #endif +/* Emulate cons25-like behaviour. */ +#define TEKEN_CONS25 #ifdef TEKEN_UTF8 typedef uint32_t teken_char_t; Modified: head/sys/dev/syscons/teken/teken_demo.c ============================================================================== --- head/sys/dev/syscons/teken/teken_demo.c Sat Jan 3 19:38:47 2009 (r186728) +++ head/sys/dev/syscons/teken/teken_demo.c Sat Jan 3 22:51:54 2009 (r186729) @@ -70,7 +70,7 @@ struct pixel { }; #define NCOLS 80 -#define NROWS 24 +#define NROWS 25 struct pixel buffer[NCOLS][NROWS]; static int ptfd; @@ -279,7 +279,7 @@ main(int argc __unused, char *argv[] __u perror("forkpty"); exit(1); case 0: - setenv("TERM", "xterm-color", 1); + setenv("TERM", "cons25", 1); setenv("LC_CTYPE", "UTF-8", 0); execlp("zsh", "-zsh", NULL); execlp("bash", "-bash", NULL); Modified: head/sys/dev/syscons/teken/teken_subr.h ============================================================================== --- head/sys/dev/syscons/teken/teken_subr.h Sat Jan 3 19:38:47 2009 (r186728) +++ head/sys/dev/syscons/teken/teken_subr.h Sat Jan 3 22:51:54 2009 (r186729) @@ -250,6 +250,8 @@ teken_subr_cursor_backward_tabulation(te if (teken_tab_isset(t, t->t_cursor.tp_col)) ntabs--; } while (ntabs > 0); + + teken_funcs_cursor(t); } static void @@ -291,6 +293,8 @@ teken_subr_cursor_forward_tabulation(tek if (teken_tab_isset(t, t->t_cursor.tp_col)) ntabs--; } while (ntabs > 0); + + teken_funcs_cursor(t); } static void @@ -527,6 +531,10 @@ teken_subr_horizontal_position_absolute( static void teken_subr_horizontal_tab(teken_t *t) { +#ifdef TEKEN_CONS25 + + teken_subr_cursor_forward_tabulation(t, 1); +#else /* !TEKEN_CONS25 */ teken_rect_t tr; tr.tr_begin = t->t_cursor; @@ -537,6 +545,7 @@ teken_subr_horizontal_tab(teken_t *t) /* Blank region that we skipped. */ if (tr.tr_end.tp_col > tr.tr_begin.tp_col) teken_funcs_fill(t, &tr, BLANK, &t->t_curattr); +#endif /* TEKEN_CONS25 */ } static void @@ -708,6 +717,22 @@ teken_subr_regular_character(teken_t *t, if (width <= 0) return; +#ifdef TEKEN_CONS25 + teken_subr_do_putchar(t, &t->t_cursor, c, width); + t->t_cursor.tp_col += width; + + if (t->t_cursor.tp_col >= t->t_winsize.tp_col) { + if (t->t_cursor.tp_row == t->t_scrollreg.ts_end - 1) { + /* Perform scrolling. */ + teken_subr_do_scroll(t, 1); + } else { + /* No scrolling needed. */ + if (t->t_cursor.tp_row < t->t_winsize.tp_row - 1) + t->t_cursor.tp_row++; + } + t->t_cursor.tp_col = 0; + } +#else /* !TEKEN_CONS25 */ if (t->t_cursor.tp_col == t->t_winsize.tp_col - 1 && (t->t_stateflags & (TS_WRAPPED|TS_AUTOWRAP)) == (TS_WRAPPED|TS_AUTOWRAP)) { @@ -752,6 +777,7 @@ teken_subr_regular_character(teken_t *t, t->t_stateflags &= ~TS_WRAPPED; } } +#endif /* TEKEN_CONS25 */ teken_funcs_cursor(t); }