New udav(4) vendor diff
I added it to the usbdevs file, and modified the device probe code in if_udav.c Index: usbdevs === RCS file: /cvs/src/sys/dev/usb/usbdevs,v retrieving revision 1.553 diff -u -p -r1.553 usbdevs --- usbdevs 29 Aug 2011 10:51:18 - 1.553 +++ usbdevs 3 Sep 2011 07:26:16 - @@ -431,6 +431,7 @@ vendor CONCEPTRONIC 0x0d8e Conceptronic vendor MSI 0x0db0 Micro Star International vendor ELCON 0x0db7 ELCON Systemtechnik vendor UNKNOWN50x0dcd Unknown Vendor +vendor UNKNOWN60x01e1 Unknown Vendor vendor SITECOMEU 0x0df6 Sitecom Europe vendor MOBILEACTION0x0df7 Mobile Action vendor AMIGO 0x0e0b Amigo Technology @@ -3787,6 +3788,9 @@ product UNKNOWN4 DM9601 0x8101 DM9601 /* Unknown vendor 5 */ product UNKNOWN5 NF_RIC0x0001 NF RIC + +/* Unknown vendor 6 */ +product UNKNOWN6 DM96010x9601 DM9601 /* U.S. Robotics products */ product USR USR11200x00eb USR1120 WLAN Index: if_udav.c === RCS file: /cvs/src/sys/dev/usb/if_udav.c,v retrieving revision 1.57 diff -u -p -r1.57 if_udav.c --- if_udav.c 3 Jul 2011 15:47:17 - 1.57 +++ if_udav.c 3 Sep 2011 07:26:16 - @@ -167,7 +167,8 @@ static const struct udav_type { {{ USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_ST268 }, 0 }, {{ USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_ZT6688 }, 0 }, {{ USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_ADM8515 }, 0 }, - {{ USB_VENDOR_UNKNOWN4, USB_PRODUCT_UNKNOWN4_DM9601 }, 0 } + {{ USB_VENDOR_UNKNOWN4, USB_PRODUCT_UNKNOWN4_DM9601 }, 0 }, + {{ USB_VENDOR_UNKNOWN6, USB_PRODUCT_UNKNOWN6_DM9601 }, 0 } }; #define udav_lookup(v, p) ((struct udav_type *)usb_lookup(udav_devs, v, p))
Fix a missing DPRINTF in awacs.c
Hi, On my B&W G3 (macppc), awacs(4) gets me easily spammed whenever sounds starts/stops/pauses/etc. with the following output: trigger_input 0xe5f9b000 0xe5faa000 0x3000 It just seems to be a missing DPRINTF in awacs_trigger_intput(), which awacs_trigger_output() has. The following diff fixes the problem for me (i.e: don't print that unless AWACS_DEBUG is defined). Cheers, Donovan. Index: awacs.c === RCS file: /cvs/src/sys/arch/macppc/dev/awacs.c,v retrieving revision 1.25 diff -u -p -r1.25 awacs.c --- awacs.c 15 Jul 2010 03:43:11 - 1.25 +++ awacs.c 3 Sep 2011 09:18:32 - @@ -1072,7 +1072,7 @@ awacs_trigger_input(void *h, void *start vaddr_t spa, pa, epa; int c; - printf("trigger_input %p %p 0x%x\n", start, end, bsize); + DPRINTF("trigger_input %p %p 0x%x\n", start, end, bsize); for (p = sc->sc_dmas; p && p->addr != start; p = p->next); if (!p)
Re: ctags(1) and mg
On Fri, Sep 02, 2011 at 10:17:02AM -0700, Matthew Dempsky wrote: > On Fri, Sep 2, 2011 at 8:55 AM, Sunil Nimmagadda > wrote: > > This diff adds tags support to Mg. I am NOT an emacs user so if this > > combination is a bit odd then please excuse. It parses the tags file > > generated by ctags(1) and maintains a tree. M-. on first character of > > a word jumps to it's definition and M-* jumps back to previous location. > > I'd love to have ctags support in mg. > > > -# $OpenBSD: Makefile,v 1.24 2011/02/02 05:21:36 lum Exp $ > > +# $OpenBSD: Makefile,v 1.23 2011/01/18 17:35:42 lum Exp $ > > Can you recreate the diff without these changes? > > > > +/* > > + * Helper function to append a character to a C string. > > + */ > > +static void > > +append(char *s, int c) > > +{ > > + ? ? ? ?size_t l = strlen(s); > > + ? ? ? s[l++] = c; > > + ? ? ? s[l] = '\0'; > > +} > > I don't like this. I don't see any evidence that the length of s here > will be bounded, and it appears to be used to fill a local fixed-sized > buffer. > > Having to call strlen() for each character append is suboptimal too. > Means building up the string takes O(n^2) time. > > (I haven't had a chance to look at the diff in depth yet, but this > issue stood out to me.) Being a little less stupid this time. Rewrote the string handling part, style(9) formatting and refactored pushtag function. Mg and emacs unlike nvi don't consider '_' as "inword" i.e., if you forward-word on "tags_init", the cursor is positioned at '_' instead of at the end of the word. This causes lookup on identifiers with '_" fail. The cinfo.c part of following diff fixes this. I am not sure if this offends mg users. I will take back cinfo.c changes if its wrong to do so. Index: Makefile === RCS file: /cvs/src/usr.bin/mg/Makefile,v retrieving revision 1.24 diff -u -p -r1.24 Makefile --- Makefile2 Feb 2011 05:21:36 - 1.24 +++ Makefile3 Sep 2011 11:39:41 - @@ -24,7 +24,7 @@ SRCS= autoexec.c basic.c buffer.c cinfo. # # More or less standalone extensions. # -SRCS+= cmode.c dired.c grep.c theo.c +SRCS+= cmode.c dired.c grep.c theo.c tags.c afterinstall: ${INSTALL} -d ${DESTDIR}${DOCDIR}/mg Index: cinfo.c === RCS file: /cvs/src/usr.bin/mg/cinfo.c,v retrieving revision 1.15 diff -u -p -r1.15 cinfo.c --- cinfo.c 13 Dec 2005 06:01:27 - 1.15 +++ cinfo.c 3 Sep 2011 11:39:41 - @@ -43,7 +43,7 @@ const char cinfo[256] = { _MG_U | _MG_W, _MG_U | _MG_W, _MG_U | _MG_W, _MG_U | _MG_W, /* 0x5X */ _MG_U | _MG_W, _MG_U | _MG_W, _MG_U | _MG_W, _MG_U | _MG_W, _MG_U | _MG_W, _MG_U | _MG_W, _MG_U | _MG_W, 0, - 0, 0, 0, 0, + 0, 0, 0, _MG_W, 0, _MG_L | _MG_W, _MG_L | _MG_W, _MG_L | _MG_W, /* 0x6X */ _MG_L | _MG_W, _MG_L | _MG_W, _MG_L | _MG_W, _MG_L | _MG_W, _MG_L | _MG_W, _MG_L | _MG_W, _MG_L | _MG_W, _MG_L | _MG_W, Index: def.h === RCS file: /cvs/src/usr.bin/mg/def.h,v retrieving revision 1.116 diff -u -p -r1.116 def.h --- def.h 23 Jan 2011 00:45:03 - 1.116 +++ def.h 3 Sep 2011 11:39:41 - @@ -514,6 +514,10 @@ int backdel(int, int); int space_to_tabstop(int, int); int backtoindent(int, int); int joinline(int, int); + +/* tags.c X */ +int pushtag(int, int); +int poptag(int, int); /* extend.c X */ int insert(int, int); Index: keymap.c === RCS file: /cvs/src/usr.bin/mg/keymap.c,v retrieving revision 1.45 diff -u -p -r1.45 keymap.c --- keymap.c18 Jan 2011 16:25:40 - 1.45 +++ keymap.c3 Sep 2011 11:39:42 - @@ -204,8 +204,11 @@ static PF metapct[] = { }; static PF metami[] = { + poptag, /* * */ + rescan, /* + */ + rescan, /* , */ negative_argument, /* - */ - rescan, /* . */ + pushtag,/* . */ rescan, /* / */ digit_argument, /* 0 */ digit_argument, /* 1 */ @@ -231,7 +234,7 @@ static PF metasqf[] = { joinline, /* ^ */ rescan, /* _ */ rescan, /* ` */ - rescan, /* a */ + rescan, /* a */ backword, /* b */ capword,/* c */ delfword, /* d */ @@ -298,7 +301,7 @@ struct KEYMAPE (8 + IMAPEXT) metamap = { '%', '%', metapct, NULL }, { - '-', '>', metami, NULL + '*', '>', metami, NULL }, {
Re: ctags(1) and mg
> Being a little less stupid this time. Rewrote the string handling > part, style(9) formatting and refactored pushtag function. Some thoughts about this. Are you sure you're not going to overflow t in re_tag_conv when you insert escapes? Correct me if I'm wrong, but I think ctags patterns aren't really regexes (which is why you're playing with escapes, and stripping & re-inserting magic) -- wouldn't it be easier to do the matching in a plain loop, checking the start/end offsets against bol/eol if the magic anchors were present? Second, it seems you're allocating a number of strings in addctag. This isn't technically wrong, but one of the upsides of NUL-terminated strings is that you can split one into many (as strsep does) without messing with multiple buffers & allocs & frees. I'd supplement ctagnode with a flag field to tell which magic anchors were present originally. I'd actually strip all the magic and backslashes in addctag, such that pattern pointed to by pat is simply a plain string which must exactly match what's in the buffer, character by character -- making the match loop I proposed above a trivial one. Finally, the choice to use underscores in the name of one function stands out as a little bit odd ;-) That's what I got at a quick glance. I'll try give it another look once this fever and headache fade.
training
Hi, I'm looking for an OpenBSD Training that will cover the following topics : - Maintain OpenBSD (secure, update, upgrade, the box and basic tasks) - Administrate the box (log, process, clamav) - Networking services (mailserver, webmail, webserver, ftp, sftp, IDS, DNS, VPN using ike1,ikev2) I want a training like : Have a pdf course, and complete the tasks with a ssh access (i will give it to the trainer to verify what i have done). I have a budget of 500 EUR. Thank you very much for your reply. Kind regards, Wesley
Re: UPDATE: usr.bin/less
On Tue, Aug 30, 2011 at 10:37:15PM +0600, Alexandr Shadchin wrote: > Hi, > > http://koba.devio.us/distfiles/less.diff > > This update less to the latest release 444. > Tested on i386 and amd64. > > Change build system ( or leave old ? ): > * no configure, used prepared define.h > * no Makefile.bsd-wrapper, used less/Makefile and lesskey/Makefile > > Please test on other arch. > > Comments ? OK ? > > -- > Alexandr Shadchin > New diff http://koba.devio.us/distfiles/less.v2.diff Changes: * for "more" added option -X (Don't use termcap init/deinit strings). This fixes: if you do "more /some/file" where the file is less than a screen-full, the display flashes but nothing is left on-screen. -- Alexandr Shadchin
Re: UPDATE: usr.bin/less
On Fri, Sep 02, 2011 at 05:24:52PM +0200, Matthieu Herrb wrote: > On Fri, Sep 02, 2011 at 09:14:45PM +0600, Alexandr Shadchin wrote: > > On Fri, Sep 02, 2011 at 10:25:49AM +0200, Martin Pieuchot wrote: > > > On 30/08/11(Tue) 22:37, Alexandr Shadchin wrote: > > > > Hi, > > > > > > > > http://koba.devio.us/distfiles/less.diff > > > > > > > > This update less to the latest release 444. > > > > Tested on i386 and amd64. > > > > > > > > Change build system ( or leave old ? ): > > > > * no configure, used prepared define.h > > > > * no Makefile.bsd-wrapper, used less/Makefile and lesskey/Makefile > > > > > > I am in favor of the new and simple Makefiles, but do we need to keep > > > the configure script in that case? > > > > > > > I not removed configure script. I have had in mind that it does not need to > > run. > > > > It's generally easier for future imports of newer versions to keep all > distributed files. > I would also like keep all distributed files. Someone will be against it? > > > > Please test on other arch. > > > > > > > > Comments ? OK ? > > > > > > This update fixes an issue for me here at work on amd64, I'll test on more > > > archs this WE. > > > > > > Martin > > > > -- > > Alexandr Shadchin > > > > -- > Matthieu Herrb -- Alexandr Shadchin
Re: ctags(1) and mg
On Sat, Sep 03, 2011 at 07:12:40PM +0300, Henri Kemppainen wrote: > > Being a little less stupid this time. Rewrote the string handling > > part, style(9) formatting and refactored pushtag function. > > Some thoughts about this. Are you sure you're not going to overflow > t in re_tag_conv when you insert escapes? Correct me if I'm wrong, > but I think ctags patterns aren't really regexes (which is why you're > playing with escapes, and stripping & re-inserting magic) -- wouldn't > it be easier to do the matching in a plain loop, checking the start/end > offsets against bol/eol if the magic anchors were present? The assumption in "ex" is that "t" is of double the size of "s" so that there is enough room to insert escapes in the worst case if every character needs to be escaped. Yes, "t" should be of size NLINE * 2 + 1. Plain loop matching would work provided ctags(1) doesn't escape every "/" with a "\". I have a earlier diff which does this simple char to char comparsion but it failed with these backslashes and that is when I looked at "ex" code and I felt it much cleaner than rolling my own. Oh and I almost forgot lines in mg aren't NUL terminated. > > Second, it seems you're allocating a number of strings in addctag. > This isn't technically wrong, but one of the upsides of NUL-terminated > strings is that you can split one into many (as strsep does) without > messing with multiple buffers & allocs & frees. > Yes, that is possible and never crossed my mind. Will try to come up with a new diff. > I'd supplement ctagnode with a flag field to tell which magic anchors > were present originally. I'd actually strip all the magic and backslashes > in addctag, such that pattern pointed to by pat is simply a plain string > which must exactly match what's in the buffer, character by character -- > making the match loop I proposed above a trivial one. > > Finally, the choice to use underscores in the name of one function stands > out as a little bit odd ;-) > I am trying to be consistent with names here, all init methods were indeed named _init. > That's what I got at a quick glance. I'll try give it another look once > this fever and headache fade. > get well soon :)
Re: Training Request from Wesley
Nothing was signed, and nothing was started... > > On Sat, 3 Sep 2011 14:29:26 -0400, George Rosamond > wrote: >> Regarding the request for training email, I'd like to provide some > context. >> >> First, AFAIK, this is not the appropriate list for such a query as per >> http://openbsd.org/mail.html. >> >> It's not my place to decide the relevance, but perhaps the poster will >> note that in the future. >> >> Second, I actually created those exercises for Wesley, working with him >> over the past 5 weeks or so, customized based on his interests and his >> failing grade with the BSD Certification BSDA exam. >> >> He has paid nothing thus far, yet we have come to the same agreement >> repeatedly on the training. It has been a laborious process as myself > and >> others have spent a lot of time working with him. >> >> So now he queries *this* list with work that *I've* done and seeks >> training. >> >> Not cool IMO. >> >> I apologize for misusing this list. Enough of you know me personally > and >> know this isn't normal behavior on my part. I felt I had no choice. >> >> It's not in my power to tell anyone *not* to reply to him or even not > use >> the set of exercises I created. But I hope that everyone is fully aware > of >> the background of this query. >> >> Thanks >> >> George
Training Request from Wesley
Regarding the request for training email, I'd like to provide some context. First, AFAIK, this is not the appropriate list for such a query as per http://openbsd.org/mail.html. It's not my place to decide the relevance, but perhaps the poster will note that in the future. Second, I actually created those exercises for Wesley, working with him over the past 5 weeks or so, customized based on his interests and his failing grade with the BSD Certification BSDA exam. He has paid nothing thus far, yet we have come to the same agreement repeatedly on the training. It has been a laborious process as myself and others have spent a lot of time working with him. So now he queries *this* list with work that *I've* done and seeks training. Not cool IMO. I apologize for misusing this list. Enough of you know me personally and know this isn't normal behavior on my part. I felt I had no choice. It's not in my power to tell anyone *not* to reply to him or even not use the set of exercises I created. But I hope that everyone is fully aware of the background of this query. Thanks George
device IDs from Gigabyte H61 board
Hi! I'm working with Gigabyte H61M-S2V-B3 right now. Graphics built in CPU supports at most 800x600 in X.org, but the rest of the machine seems fine. Dmesg at dmesg@ and at NYCBUG database. However, these are missing (fixed with the aid of UCW's database). -- Martin Pelikan Index: dev/pci/pcidevs === RCS file: /cvs/src/sys/dev/pci/pcidevs,v retrieving revision 1.1618 diff -u -p -r1.1618 pcidevs --- dev/pci/pcidevs 30 Aug 2011 15:57:10 - 1.1618 +++ dev/pci/pcidevs 3 Sep 2011 23:04:45 - @@ -2603,10 +2603,11 @@ product INTEL QS67_LPC 0x1c4d QS67 LPC product INTEL Q67_LPC 0x1c4e Q67 LPC product INTEL QM67_LPC 0x1c4f QM67 LPC product INTEL B65_LPC 0x1c50 B65 LPC -product INTEL H61_LPC 0x1c51 H61 LPC +product INTEL 6SERIES_LPC 0x1c51 6 Series LPC product INTEL C202_LPC 0x1c52 C202 LPC product INTEL C204_LPC 0x1c54 C204 LPC product INTEL C206_LPC 0x1c56 C206 LPC +product INTEL H61_LPC 0x1c5c H61 LPC product INTEL 82801AA_LPC 0x2410 82801AA LPC product INTEL 82801AA_IDE 0x2411 82801AA IDE product INTEL 82801AA_USB 0x2412 82801AA USB Index: dev/usb/usbdevs === RCS file: /cvs/src/sys/dev/usb/usbdevs,v retrieving revision 1.553 diff -u -p -r1.553 usbdevs --- dev/usb/usbdevs 29 Aug 2011 10:51:18 - 1.553 +++ dev/usb/usbdevs 3 Sep 2011 23:04:46 - @@ -2050,6 +2050,7 @@ product INSYSTEM ADAPTERV20x5701 USB St /* Intel products */ product INTEL2 RMH 0x0020 Rate Matching Hub +product INTEL2 RMH_SANDYBRIDGE 0x0024 Rate Matching Hub product INTEL EASYPC_CAMERA0x0110 EasyPC product INTEL AP3100x0200 AP310 AnyPoint II product INTEL I2011B 0x Wireless 2011B
disklabel(8) typo
Index: disklabel.8 === RCS file: /cvs/src/sbin/disklabel/disklabel.8,v retrieving revision 1.103 diff -u -p -r1.103 disklabel.8 --- disklabel.8 5 Jun 2011 11:57:17 - 1.103 +++ disklabel.8 3 Sep 2011 23:45:26 - @@ -163,7 +163,7 @@ Write entries to in .Xr fstab 5 format for any partitions for which mount point information is known. -The entries will written using disklabel UIDs. +The entries will be written using disklabel UIDs. The .Fl F flag is only valid when used in conjunction with the