[PATCH] loongson.html
Hi tech@, All links are currently dead on this page. This diff fixes them all. PMON pages aren't hosted on their own server anymore but only on Opsycon site now. Lemote recently updated their site, there is no English version anymore but thankfully they kept the old one on a subdomain. Link to the Gdium Liberty doesn't exist anywhere anymore, the Internet Archive has a copy though. Index: loongson.html === RCS file: /cvs/www/loongson.html,v retrieving revision 1.50 diff -u -p -u -p -r1.50 loongson.html --- loongson.html 23 Dec 2015 20:07:18 - 1.50 +++ loongson.html 27 Jan 2016 22:13:57 - @@ -25,7 +25,7 @@ align="right"> OpenBSD/loongson is a port intended to run on systems based upon the Loongson (also known as Godson) 2E and 2F MIPS-compatible processors, using the -http://www.pmon2000.com/;>PMON firmware and boot loader. +http://www.opsycon.se/PMON2000/Main;>PMON firmware and boot loader. Table of contents @@ -72,21 +72,21 @@ Specific hardware support is then writte At the moment, the following machines are supported: -http://www.lemote.com/en/products/mini-computer/2010/0310/111.html;>Lemote Fuloong 2F +http://zkml.lemote.com/en/products/mini-computer/2010/0310/111.html;>Lemote Fuloong 2F mini-PC All on-board devices are supported, but the framebuffer is currently limited to the 640x400x8 video mode set up by the firmware. -http://www.lemote.com/en/products/all-in-one/2010/0311/122.html;>Lemote Lynloong all-in-one-PC +http://zkml.lemote.com/en/products/all-in-one/2010/0311/122.html;>Lemote Lynloong all-in-one-PC All on-board devices are supported, but the framebuffer is currently limited to the 1360x768x16 video mode set up by the firmware. -http://www.lemote.com/en/products/Notebook/2010/0310/112.html;>Lemote Yeeloong +http://zkml.lemote.com/en/products/Notebook/2010/0310/112.html;>Lemote Yeeloong netbook Both the 8.9" and 10.1" models are supported. All on-board devices are supported. -http://www.gdium.com/en/product/liberty1000;>EMTEC Gdium Liberty 1000 netbook +https://web.archive.org/web/20130401064451/http://www.gdium.com/en/product/liberty1000;>EMTEC Gdium Liberty 1000 netbook All on-board devices but the audio controller are supported.
Re: [calendar] United States holiday migrations
On Wed, Jan 27, 2016 at 11:06:41PM +, Craig Skinner wrote: > Hi folks, > > NOOP;- relocate USA state/national holidays from calendar.holiday > into existing sparse calendar.usholiday file. > > As they're now in the USA holiday file, strip state names from holiday > names where the state is named in the day itself. > > e.g: 'Oklahoma Day in Oklahoma' becomes 'Oklahoma Day'. > e.g: 'Youth Day in Oklahoma' remains unchanged. > hi craig. i have to say i am less keen on this. i think calendar.holiday is pretty much a us-centric file anyway, for fairly obvious reasons. i'm not sure that splitting this file makes sense. we'll end up with a holiday file with few entries, and which belong nowhere. having said that, "oklahoma day in oklahoma" is kind of nuts. we could probably still change entries like that (but not in a separate file). jmc > > Index: calendar.holiday > === > RCS file: /cvs/src/usr.bin/calendar/calendars/calendar.holiday,v > retrieving revision 1.35 > diff -u -p -r1.35 calendar.holiday > --- calendar.holiday 20 Jan 2016 19:12:28 - 1.35 > +++ calendar.holiday 27 Jan 2016 22:52:23 - > @@ -27,16 +27,12 @@ > 01/15Arbor Day in Jordan > 01/16Martyrs Day in Benin > 01/18Revolution Day in Tunisia > -01/19Confederate Heroes Day in Texas > 01/19Ethopian Epiphany in Ethiopia > 01/19Nameday of Archbishop Makarios in Cyprus > 01/20Army Day in Mali > 01/20National Heroes Day in Guinea-Bissau > -01/MonThird Robert E. Lee's Birthday in Alabama & Mississippi (3rd Monday) > -01/MonThird Lee-Jackson Day in Virginia (3rd Monday) > 01/21Our Lady of Altagracia in Dominican Republic > 01/23Feast of St. Ildefonsus > -01/23National Handwriting Day > 01/24Economic Liberation Day in Togo > 01/26Republic Day in India > 01/30Australia Day in Australia > @@ -60,11 +56,9 @@ > 03/01Samil Independence Movement Day in South Korea > 03/01St. David's Day, Cardiff > 03/02Peasants Day in Burma > -03/02Texas Independence day > 03/02Victory of Adowa in Ethiopia > 03/03Girl's Day in Japan > 03/03Throne Day in Morocco > -03/04Vermont Admission Day (admitted as 14th state in 1791) > 03/05Independence Day in Equatorial Guinea > 03/06Lantern Day, Bejing > 03/07* Purim - Feast of Lots > @@ -76,39 +70,31 @@ > 03/09Decoration Day in Liberia > 03/09Falgun Purnima Day in Nepal > 03/10Labor Day in South Korea > -03/11Johnny Appleseed Day; anniversary of the death of John Chapman > 03/12Commonwealth Day in Swaziland > 03/12Independence Day in Mauritius > 03/12Moshoeshoe's Birthday in Lesotho > 03/12Renovation Day in Gabon > 03/13National Day in Grenada > 03/15Day of the 1848 revolution in Hungary > -03/16Black Press Day; first Black newspaper founded in 1827 > -03/17Evacuation Day in Suffolk County, Massachusetts > 03/17St. Patrick's Day > 03/19St. Joseph's Day in Colombia, Costa Rica, Holy See, > Liechtenstein, > Bavaria, San Marino, Spain, Venezuela > 03/19Tree Planting Day in Lestho > 03/20Independence Day in Tunsia > -03/20Youth Day in Oklahoma > 03/21Afghan New Year in Afghanistan > 03/21Juarez' Birthday in Mexico > 03/22Abolition Day in Puerto Rico > 03/23Pakistan Day in Pakistan > 03/25Greek Independence Day in Cyprus > 03/25Lady Day (a.k.a. the Feast of the Annunciation) > -03/25Maryland Day in Maryland > 03/25National Holiday in Greece > -03/MonLast Seward's Day in Alaska (last Monday) > 03/26Independence Day in Bangladesh > -03/26Prince Jonah Kuhio Kalanianaole Day in Hawaii > 03/27Armed Forces Day in Burma > 03/29Death of President Barthelemy Boganda in Central African > Republic > 03/29Memorial Day in Madagascar > 03/31National Day in Malta > 04/01Youth Day in Benin > 04/02Malvinas Day in Argentina > -04/02Pascua Florida Day in Florida > 04/04Ching Ming Festival in Hong Kong > 04/04Liberation Day in Hungary > 04/04National Day in Senegal > @@ -123,7 +109,6 @@ > 04/13Songkran Day in Thailand > 04/14Day of the Americas in Honduras > 04/15Bengali New Year in Bangladesh > -04/MonThird Patriot's Day in Maine & Massachusetts (3rd Monday) > 04/16De Diego's Birthday (celebrated in Puerto Rico) > 04/16Holy Week (5 days) in Venezuela > 04/16Tourist Week (5 days) in Uruguay > @@ -131,39 +116,28 @@ > 04/18Independence Day in Chile, Zimbabwe > 04/19Declaration of Independence in Venezuela > 04/19Republic Day in Sierra Leone > -04/21
lpd, etc race condition on lock file
Right now, lpr, lpc and lprm all have control of the spooling process, with the current job in the lock file. But this file can of course change while one of the other programs uses it to control the daemons and jobs to be printed or stopped/deleted. I'm far from an expert on this, but it seems to me that only one single program should be able to do these actions, with these three programs making a request to that program. Then these three programs could have lesser privileges than right now. Keeping them would be necessary to keep all the old scripts and uses working. Is this a good idea or is there a better solution? Chris Bennett
[calendar] United States holiday migrations
Hi folks, NOOP;- relocate USA state/national holidays from calendar.holiday into existing sparse calendar.usholiday file. As they're now in the USA holiday file, strip state names from holiday names where the state is named in the day itself. e.g: 'Oklahoma Day in Oklahoma' becomes 'Oklahoma Day'. e.g: 'Youth Day in Oklahoma' remains unchanged. Index: calendar.holiday === RCS file: /cvs/src/usr.bin/calendar/calendars/calendar.holiday,v retrieving revision 1.35 diff -u -p -r1.35 calendar.holiday --- calendar.holiday20 Jan 2016 19:12:28 - 1.35 +++ calendar.holiday27 Jan 2016 22:52:23 - @@ -27,16 +27,12 @@ 01/15 Arbor Day in Jordan 01/16 Martyrs Day in Benin 01/18 Revolution Day in Tunisia -01/19 Confederate Heroes Day in Texas 01/19 Ethopian Epiphany in Ethiopia 01/19 Nameday of Archbishop Makarios in Cyprus 01/20 Army Day in Mali 01/20 National Heroes Day in Guinea-Bissau -01/MonThirdRobert E. Lee's Birthday in Alabama & Mississippi (3rd Monday) -01/MonThirdLee-Jackson Day in Virginia (3rd Monday) 01/21 Our Lady of Altagracia in Dominican Republic 01/23 Feast of St. Ildefonsus -01/23 National Handwriting Day 01/24 Economic Liberation Day in Togo 01/26 Republic Day in India 01/30 Australia Day in Australia @@ -60,11 +56,9 @@ 03/01 Samil Independence Movement Day in South Korea 03/01 St. David's Day, Cardiff 03/02 Peasants Day in Burma -03/02 Texas Independence day 03/02 Victory of Adowa in Ethiopia 03/03 Girl's Day in Japan 03/03 Throne Day in Morocco -03/04 Vermont Admission Day (admitted as 14th state in 1791) 03/05 Independence Day in Equatorial Guinea 03/06 Lantern Day, Bejing 03/07* Purim - Feast of Lots @@ -76,39 +70,31 @@ 03/09 Decoration Day in Liberia 03/09 Falgun Purnima Day in Nepal 03/10 Labor Day in South Korea -03/11 Johnny Appleseed Day; anniversary of the death of John Chapman 03/12 Commonwealth Day in Swaziland 03/12 Independence Day in Mauritius 03/12 Moshoeshoe's Birthday in Lesotho 03/12 Renovation Day in Gabon 03/13 National Day in Grenada 03/15 Day of the 1848 revolution in Hungary -03/16 Black Press Day; first Black newspaper founded in 1827 -03/17 Evacuation Day in Suffolk County, Massachusetts 03/17 St. Patrick's Day 03/19 St. Joseph's Day in Colombia, Costa Rica, Holy See, Liechtenstein, Bavaria, San Marino, Spain, Venezuela 03/19 Tree Planting Day in Lestho 03/20 Independence Day in Tunsia -03/20 Youth Day in Oklahoma 03/21 Afghan New Year in Afghanistan 03/21 Juarez' Birthday in Mexico 03/22 Abolition Day in Puerto Rico 03/23 Pakistan Day in Pakistan 03/25 Greek Independence Day in Cyprus 03/25 Lady Day (a.k.a. the Feast of the Annunciation) -03/25 Maryland Day in Maryland 03/25 National Holiday in Greece -03/MonLast Seward's Day in Alaska (last Monday) 03/26 Independence Day in Bangladesh -03/26 Prince Jonah Kuhio Kalanianaole Day in Hawaii 03/27 Armed Forces Day in Burma 03/29 Death of President Barthelemy Boganda in Central African Republic 03/29 Memorial Day in Madagascar 03/31 National Day in Malta 04/01 Youth Day in Benin 04/02 Malvinas Day in Argentina -04/02 Pascua Florida Day in Florida 04/04 Ching Ming Festival in Hong Kong 04/04 Liberation Day in Hungary 04/04 National Day in Senegal @@ -123,7 +109,6 @@ 04/13 Songkran Day in Thailand 04/14 Day of the Americas in Honduras 04/15 Bengali New Year in Bangladesh -04/MonThirdPatriot's Day in Maine & Massachusetts (3rd Monday) 04/16 De Diego's Birthday (celebrated in Puerto Rico) 04/16 Holy Week (5 days) in Venezuela 04/16 Tourist Week (5 days) in Uruguay @@ -131,39 +116,28 @@ 04/18 Independence Day in Chile, Zimbabwe 04/19 Declaration of Independence in Venezuela 04/19 Republic Day in Sierra Leone -04/21 San Jacinto Day in Texas -04/22 Arbor Day in Nebraska & Delaware -04/22 Oklahoma Day in Oklahoma 04/24 Victory Day in Togo 04/24* Pesach - First Day of Passover - Festival of Freedom 04/25* ANZAC Day in Australia, New Zealand, and various other influenced places 04/25 Liberation Day in Italy 04/25 National Flag Day in Swaziland -04/26 Confederate Memorial Day in Florida & Georgia 04/26 Union Day in Tanzania 04/27 Day of Uprising Against Occupation in Slovenia 04/27 Independence Day in Togo -04/MonLast Arbor Day in Wyoming (last Monday) -04/MonLast Confederate Memorial Day in Alabama & Mississippi (last Monday) 04/30 The Workers Day in Uruguay 05/01 Labor Day in many places -05/01 Law Day (decl. by Eisenhower) 05/01 May Day in many places 05/02 Constitution Day in Japan 05/03 Constitution Day in Poland -05/04 Rhode Island Independence Day 05/05 Children's Day in Japan, South Korea 05/05 Coronation Day in Thailand 05/05 Liberation Day in the Netherlands 05/06 Bataan Day in Philippines 05/06* Bank Holiday in UK 05/07 May Day in United
Re: [calendar] United States holiday migrations
Just for the record 01/30 Australia Day in Australia should be 01/26 Australia Day in Australia If someone so wishes to fix it. Ian McWilliam From: owner-t...@openbsd.org [owner-t...@openbsd.org] on behalf of Craig Skinner [skin...@britvault.co.uk] Sent: Thursday, 28 January 2016 10:06 AM To: tech@openbsd.org Subject: [calendar] United States holiday migrations Hi folks, NOOP;- relocate USA state/national holidays from calendar.holiday into existing sparse calendar.usholiday file. As they're now in the USA holiday file, strip state names from holiday names where the state is named in the day itself. e.g: 'Oklahoma Day in Oklahoma' becomes 'Oklahoma Day'. e.g: 'Youth Day in Oklahoma' remains unchanged. Index: calendar.holiday === RCS file: /cvs/src/usr.bin/calendar/calendars/calendar.holiday,v retrieving revision 1.35 diff -u -p -r1.35 calendar.holiday --- calendar.holiday20 Jan 2016 19:12:28 - 1.35 +++ calendar.holiday27 Jan 2016 22:52:23 - @@ -27,16 +27,12 @@ 01/15 Arbor Day in Jordan 01/16 Martyrs Day in Benin 01/18 Revolution Day in Tunisia -01/19 Confederate Heroes Day in Texas 01/19 Ethopian Epiphany in Ethiopia 01/19 Nameday of Archbishop Makarios in Cyprus 01/20 Army Day in Mali 01/20 National Heroes Day in Guinea-Bissau -01/MonThirdRobert E. Lee's Birthday in Alabama & Mississippi (3rd Monday) -01/MonThirdLee-Jackson Day in Virginia (3rd Monday) 01/21 Our Lady of Altagracia in Dominican Republic 01/23 Feast of St. Ildefonsus -01/23 National Handwriting Day 01/24 Economic Liberation Day in Togo 01/26 Republic Day in India 01/30 Australia Day in Australia @@ -60,11 +56,9 @@ 03/01 Samil Independence Movement Day in South Korea 03/01 St. David's Day, Cardiff 03/02 Peasants Day in Burma -03/02 Texas Independence day 03/02 Victory of Adowa in Ethiopia 03/03 Girl's Day in Japan 03/03 Throne Day in Morocco -03/04 Vermont Admission Day (admitted as 14th state in 1791) 03/05 Independence Day in Equatorial Guinea 03/06 Lantern Day, Bejing 03/07* Purim - Feast of Lots @@ -76,39 +70,31 @@ 03/09 Decoration Day in Liberia 03/09 Falgun Purnima Day in Nepal 03/10 Labor Day in South Korea -03/11 Johnny Appleseed Day; anniversary of the death of John Chapman 03/12 Commonwealth Day in Swaziland 03/12 Independence Day in Mauritius 03/12 Moshoeshoe's Birthday in Lesotho 03/12 Renovation Day in Gabon 03/13 National Day in Grenada 03/15 Day of the 1848 revolution in Hungary -03/16 Black Press Day; first Black newspaper founded in 1827 -03/17 Evacuation Day in Suffolk County, Massachusetts 03/17 St. Patrick's Day 03/19 St. Joseph's Day in Colombia, Costa Rica, Holy See, Liechtenstein, Bavaria, San Marino, Spain, Venezuela 03/19 Tree Planting Day in Lestho 03/20 Independence Day in Tunsia -03/20 Youth Day in Oklahoma 03/21 Afghan New Year in Afghanistan 03/21 Juarez' Birthday in Mexico 03/22 Abolition Day in Puerto Rico 03/23 Pakistan Day in Pakistan 03/25 Greek Independence Day in Cyprus 03/25 Lady Day (a.k.a. the Feast of the Annunciation) -03/25 Maryland Day in Maryland 03/25 National Holiday in Greece -03/MonLast Seward's Day in Alaska (last Monday) 03/26 Independence Day in Bangladesh -03/26 Prince Jonah Kuhio Kalanianaole Day in Hawaii 03/27 Armed Forces Day in Burma 03/29 Death of President Barthelemy Boganda in Central African Republic 03/29 Memorial Day in Madagascar 03/31 National Day in Malta 04/01 Youth Day in Benin 04/02 Malvinas Day in Argentina -04/02 Pascua Florida Day in Florida 04/04 Ching Ming Festival in Hong Kong 04/04 Liberation Day in Hungary 04/04 National Day in Senegal @@ -123,7 +109,6 @@ 04/13 Songkran Day in Thailand 04/14 Day of the Americas in Honduras 04/15 Bengali New Year in Bangladesh -04/MonThirdPatriot's Day in Maine & Massachusetts (3rd Monday) 04/16 De Diego's Birthday (celebrated in Puerto Rico) 04/16 Holy Week (5 days) in Venezuela 04/16 Tourist Week (5 days) in Uruguay @@ -131,39 +116,28 @@ 04/18 Independence Day in Chile, Zimbabwe 04/19 Declaration of Independence in Venezuela 04/19 Republic Day in Sierra Leone -04/21 San Jacinto Day in Texas -04/22 Arbor Day in Nebraska & Delaware -04/22 Oklahoma Day in Oklahoma 04/24 Victory Day in Togo 04/24* Pesach - First Day of Passover - Festival of Freedom 04/25* ANZAC Day in Australia, New Zealand, and various other influenced places 04/25 Liberation Day in Italy 04/25 National Flag Day in Swaziland -04/26 Confederate Memorial Day in Florida & Georgia 04/26 Union Day in Tanzania 04/27 Day of Uprising Against Occupation in Slovenia 04/27 Independence Day in Togo -04/MonLast Arbor Day in Wyoming (last Monday) -04/MonLast Confederate Memorial Day in Alabama & Mississippi (last Monday) 04/30 The Workers Day in Uruguay
whitespace patch rm.c
Index: rm.c === RCS file: /cvs/src/bin/rm/rm.c,v retrieving revision 1.35 diff -u -p -u -r1.35 rm.c --- rm.c17 Nov 2015 17:17:24 -1.35 +++ rm.c27 Jan 2016 23:20:05 - @@ -399,7 +399,7 @@ checkdot(char **argv) complained = 0; for (t = argv; *t;) { /* strip trailing slashes */ -p = strrchr (*t, '\0'); +p = strrchr(*t, '\0'); while (--p > *t && *p == '/') *p = '\0'; Not subscribed to list "cc" if you wish.
Re: udf uiomove() conversion
On Wed, Jan 27, 2016 at 06:26:00AM +0100, Stefan Kempf wrote: > Martin Natano wrote: > > Below the conversion to uiomove() for isofs/udf/. Note that converting > > size to size_t is not possible in udf_read(), as udf_readatoffset() > > requires a pointer to an integer variable. Changing that would cause a > > lot of code churn, so i chose to truncate uio_resid to INT_MAX instead. > > udf_readatoffset() wouldn't transfer more than MAXBSIZE bytes anyway. > > Looks good. If we have to trust udf_readatoffset already that it does > reasonable things with size, then passing MAXBSIZE to the ulmin would > also be an option. Now that you say it, MAXBSIZE proabably communicates the intent of the code more clearly. Thank you. Index: udf_vnops.c === RCS file: /cvs/src/sys/isofs/udf/udf_vnops.c,v retrieving revision 1.61 diff -u -p -u -r1.61 udf_vnops.c --- udf_vnops.c 23 Sep 2015 15:37:26 - 1.61 +++ udf_vnops.c 27 Jan 2016 08:13:51 - @@ -445,13 +445,12 @@ udf_read(void *v) while (uio->uio_offset < fsize && uio->uio_resid > 0) { offset = uio->uio_offset; - if (uio->uio_resid + offset <= fsize) - size = uio->uio_resid; - else + size = ulmin(uio->uio_resid, MAXBSIZE); + if (size > fsize - offset) size = fsize - offset; error = udf_readatoffset(up, , offset, , ); if (error == 0) - error = uiomovei(data, size, uio); + error = uiomove(data, (size_t)size, uio); if (bp != NULL) { brelse(bp); bp = NULL; @@ -543,7 +542,7 @@ struct udf_uiodir { static int udf_uiodir(struct udf_uiodir *uiodir, struct uio *uio, long off) { - int de_size = DIRENT_SIZE(uiodir->dirent); + size_t de_size = DIRENT_SIZE(uiodir->dirent); if (uio->uio_resid < de_size) { uiodir->eofflag = 0; @@ -552,7 +551,7 @@ udf_uiodir(struct udf_uiodir *uiodir, st uiodir->dirent->d_off = off; uiodir->dirent->d_reclen = de_size; - return (uiomovei(uiodir->dirent, de_size, uio)); + return (uiomove(uiodir->dirent, de_size, uio)); } static struct udf_dirstream * cheers, natano
Intel 9 Series Thermal support for pchtemp(4)
Hello. patch, sysctl output & dmesg below. Index: share/man/man4/pchtemp.4 === RCS file: /cvs/src/share/man/man4/pchtemp.4,v retrieving revision 1.2 diff -u -p -r1.2 pchtemp.4 --- share/man/man4/pchtemp.43 Jan 2016 05:48:47 - 1.2 +++ share/man/man4/pchtemp.427 Jan 2016 16:57:29 - @@ -26,7 +26,7 @@ The .Nm driver provides support for the temperature sensor in the Intel X99, -C610 series and 100 series platform controller hub (PCH). +C610 series, 100 series and 9 series platform controller hub (PCH). .Pp These sensors provide 0.5 degC resolution. Sensor values are made available through the Index: sys/dev/pci/pchtemp.c === RCS file: /cvs/src/sys/dev/pci/pchtemp.c,v retrieving revision 1.2 diff -u -p -r1.2 pchtemp.c --- sys/dev/pci/pchtemp.c 3 Jan 2016 05:48:47 - 1.2 +++ sys/dev/pci/pchtemp.c 27 Jan 2016 16:57:29 - @@ -16,7 +16,7 @@ */ /* - * Intel X99, C610 and 100 Series PCH thermal sensor controller driver + * Intel X99, C610, 100 and 9 Series PCH thermal sensor controller driver */ #include @@ -60,6 +60,7 @@ struct cfattach pchtemp_ca = { const struct pci_matchid pchtemp_devices[] = { { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_C610_THERM }, { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_100SERIES_THERM }, + { PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_9SERIES_LP_THERM }, }; int $ sysctl hw.sensors.pchtemp0 hw.sensors.pchtemp0.temp0=52.50 degC OpenBSD 5.9-beta (MAZAR) #9: Wed Jan 27 19:44:45 MSK 2016 mi...@mazar.park.rambler.ru:/usr/src/sys/arch/amd64/compile/MAZAR real mem = 8469090304 (8076MB) avail mem = 8208220160 (7827MB) mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.7 @ 0xacbfd000 (65 entries) bios0: vendor LENOVO version "N10ET36W (1.15 )" date 06/19/2015 bios0: LENOVO 20CM003HRT acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP SLIC ASF! HPET ECDT APIC MCFG SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT SSDT PCCT SSDT TCPA SSDT UEFI MSDM BATB FPDT UEFI acpi0: wakeup devices LID_(S4) SLPB(S3) IGBE(S4) EXP2(S4) XHCI(S3) EHC1(S3) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpihpet0 at acpi0: 14318179 Hz acpiec0 at acpi0 acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz, 2095.49 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT cpu0: 256KB 64b/line 8-way L2 cache cpu0: smt 0, core 0, package 0 mtrr: Pentium Pro MTRR support, 10 var ranges, 88 fixed ranges cpu0: apic clock running at 99MHz cpu0: mwait min=64, max=64, C-substates=0.2.1.2.4.1.1.1, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz, 2095.16 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT cpu1: 256KB 64b/line 8-way L2 cache cpu1: smt 1, core 0, package 0 cpu2 at mainbus0: apid 2 (application processor) cpu2: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz, 2095.16 MHz cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT cpu2: 256KB 64b/line 8-way L2 cache cpu2: smt 0, core 1, package 0 cpu3 at mainbus0: apid 3 (application processor) cpu3: Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz, 2095.16 MHz cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,LONG,LAHF,ABM,3DNOWP,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,RDSEED,ADX,SMAP,PT,SENSOR,ARAT cpu3: 256KB 64b/line 8-way L2 cache cpu3: smt 1, core 1, package 0 ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 40 pins acpimcfg0 at acpi0 addr 0xf800, bus 0-63 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (PEG_) acpiprt2 at acpi0: bus 2 (EXP1)
nfs uiomove() conversion
Below the uiomove() conversion for nfs. I didn't change the type of 'n' to be size_t, because it never exceeds the maximum rpc size (nm_rsize), which is an integer too. (Also, to avoid unnecessary code churn.) Index: nfs/nfs_bio.c === RCS file: /cvs/src/sys/nfs/nfs_bio.c,v retrieving revision 1.80 diff -u -p -u -r1.80 nfs_bio.c --- nfs/nfs_bio.c 14 Mar 2015 03:38:52 - 1.80 +++ nfs/nfs_bio.c 27 Jan 2016 20:46:53 - @@ -177,7 +177,7 @@ again: return (error); } } - n = min((unsigned)(biosize - on), uio->uio_resid); + n = ulmin(biosize - on, uio->uio_resid); offdiff = np->n_size - uio->uio_offset; if (offdiff < (off_t)n) n = (int)offdiff; @@ -211,7 +211,7 @@ again: return (error); } } - n = min(uio->uio_resid, NFS_MAXPATHLEN - bp->b_resid); + n = ulmin(uio->uio_resid, NFS_MAXPATHLEN - bp->b_resid); got_buf = 1; on = 0; break; @@ -223,7 +223,7 @@ again: if (n > 0) { if (!baddr) baddr = bp->b_data; - error = uiomovei(baddr + on, (int)n, uio); + error = uiomove(baddr + on, n, uio); } if (vp->v_type == VLNK) @@ -318,7 +318,7 @@ nfs_write(void *v) nfsstats.biocache_writes++; lbn = uio->uio_offset / biosize; on = uio->uio_offset & (biosize-1); - n = min((unsigned)(biosize - on), uio->uio_resid); + n = ulmin(biosize - on, uio->uio_resid); bn = lbn * (biosize / DEV_BSIZE); again: bp = nfs_getcacheblk(vp, bn, biosize, p); @@ -349,7 +349,7 @@ again: goto again; } - error = uiomovei((char *)bp->b_data + on, n, uio); + error = uiomove((char *)bp->b_data + on, n, uio); if (error) { bp->b_flags |= B_ERROR; brelse(bp); @@ -590,7 +590,7 @@ nfs_doio(struct buf *bp, struct proc *p) len = np->n_size - off_t)bp->b_blkno) << DEV_BSHIFT) + diff); if (len > 0) { - len = min(len, uiop->uio_resid); + len = ulmin(len, uiop->uio_resid); memset((char *)bp->b_data + diff, 0, len); bp->b_validend = diff + len; } else Index: nfs/nfs_subs.c === RCS file: /cvs/src/sys/nfs/nfs_subs.c,v retrieving revision 1.128 diff -u -p -u -r1.128 nfs_subs.c --- nfs/nfs_subs.c 16 Jun 2015 11:09:40 - 1.128 +++ nfs/nfs_subs.c 27 Jan 2016 20:46:58 - @@ -712,8 +712,8 @@ nfsm_uiotombuf(struct mbuf **mp, struct uiop->uio_rw = UIO_WRITE; while (len) { - xfer = min(len, M_TRAILINGSPACE(mb)); - uiomovei(mb_offset(mb), xfer, uiop); + xfer = ulmin(len, M_TRAILINGSPACE(mb)); + uiomove(mb_offset(mb), xfer, uiop); mb->m_len += xfer; len -= xfer; if (len > 0) { Index: nfs/nfs_vnops.c === RCS file: /cvs/src/sys/nfs/nfs_vnops.c,v retrieving revision 1.166 diff -u -p -u -r1.166 nfs_vnops.c --- nfs/nfs_vnops.c 22 Dec 2015 21:36:57 - 1.166 +++ nfs/nfs_vnops.c 27 Jan 2016 20:47:05 - @@ -2032,7 +2032,7 @@ nfs_readdir(void *v) break; } - if ((error = uiomovei(dp, dp->d_reclen, uio))) + if ((error = uiomove(dp, dp->d_reclen, uio))) break; newoff = fxdr_hyper(>cookie[0]); cheers, natano
wrong comment which identifies characters for banner pages
This file forms a character set for banners that should work on almost any printer. Differs from banner program characters, they have an extra line above for characters like %,},etc and vertical bar is split in banner program but full here. Index: lpdchar.c === RCS file: /cvs/src/usr.sbin/lpr/lpd/lpdchar.c,v retrieving revision 1.6 diff -u -p -r1.6 lpdchar.c --- lpdchar.c 27 Oct 2009 23:59:52 - 1.6 +++ lpdchar.c 27 Jan 2016 21:31:49 - @@ -1017,7 +1017,7 @@ const char scnkey[][HEIGHT] = /* this is c__1, c__1, c__1, - c___11__ }, /* } */ + c___11__ }, /* { */ { c___1___, c___1___,
Re: wrong comment which identifies characters for banner pages
On Wed, Jan 27, 2016 at 03:43:55PM -0600, Chris Bennett wrote: > This file forms a character set for banners that should work on almost > any printer. > Differs from banner program characters, they have an extra line above > for characters like %,},etc and vertical bar is split in banner program > but full here. committed, thanks.
Signed overflow in ufs i_modrev calculation
In ufs, the calculation of i_modrev can produce signed overflow on 32 bit architectures (found on i386). The tv.tv_usec * 4294 calculation is designed to move the microseconds part of a struct timeval to the upper bits of an unsigned(!) 32 bit value to make room for simple i_modrev increments, but the calculation is performed signed, causing overflow. The diff below gets rid of the overflow by casting to unsigned first. While there I replaced the union _qcvt/SETHIGH/SETLOW dance with simple bitshift operations. Index: ufs/ext2fs/ext2fs_subr.c === RCS file: /cvs/src/sys/ufs/ext2fs/ext2fs_subr.c,v retrieving revision 1.33 diff -u -p -u -r1.33 ext2fs_subr.c --- ufs/ext2fs/ext2fs_subr.c14 Mar 2015 03:38:52 - 1.33 +++ ufs/ext2fs/ext2fs_subr.c27 Jan 2016 08:26:05 - @@ -49,25 +49,6 @@ #include #include -union _qcvt { - int64_t qcvt; - int32_t val[2]; -}; - -#define SETHIGH(q, h) {\ - union _qcvt tmp;\ - tmp.qcvt = (q); \ - tmp.val[_QUAD_HIGHWORD] = (h); \ - (q) = tmp.qcvt; \ -} - -#define SETLOW(q, l) { \ - union _qcvt tmp;\ - tmp.qcvt = (q); \ - tmp.val[_QUAD_LOWWORD] = (l); \ - (q) = tmp.qcvt; \ -} - #ifdef _KERNEL /* @@ -220,8 +201,8 @@ ext2fs_vinit(struct mount *mp, struct vo /* Initialize modrev times */ getmicrouptime(); - SETHIGH(ip->i_modrev, tv.tv_sec); - SETLOW(ip->i_modrev, tv.tv_usec * 4294); + ip->i_modrev = (u_quad_t)tv.tv_sec << 32; + ip->i_modrev |= (u_quad_t)tv.tv_usec * 4294; *vpp = vp; Index: ufs/ufs/ufs_vnops.c === RCS file: /cvs/src/sys/ufs/ufs/ufs_vnops.c,v retrieving revision 1.123 diff -u -p -u -r1.123 ufs_vnops.c --- ufs/ufs/ufs_vnops.c 8 Dec 2015 15:31:01 - 1.123 +++ ufs/ufs/ufs_vnops.c 27 Jan 2016 08:26:10 - @@ -78,24 +78,6 @@ int filt_ufswrite(struct knote *, long); int filt_ufsvnode(struct knote *, long); void filt_ufsdetach(struct knote *); -union _qcvt { - int64_t qcvt; - int32_t val[2]; -}; - -#define SETHIGH(q, h) { \ - union _qcvt tmp; \ - tmp.qcvt = (q); \ - tmp.val[_QUAD_HIGHWORD] = (h); \ - (q) = tmp.qcvt; \ -} -#define SETLOW(q, l) { \ - union _qcvt tmp; \ - tmp.qcvt = (q); \ - tmp.val[_QUAD_LOWWORD] = (l); \ - (q) = tmp.qcvt; \ -} - /* * A virgin directory (no blushing please). */ @@ -1879,8 +1861,8 @@ ufs_vinit(struct mount *mntp, struct vop * Initialize modrev times */ getmicrouptime(); - SETHIGH(ip->i_modrev, mtv.tv_sec); - SETLOW(ip->i_modrev, mtv.tv_usec * 4294); + ip->i_modrev = (u_quad_t)mtv.tv_sec << 32; + ip->i_modrev |= (u_quad_t)mtv.tv_usec * 4294; *vpp = vp; return (0); } cheers, natano
Re: DDB is elf
On Mon, Jan 25, 2016 at 04:10:52PM +0100, Martin Pieuchot wrote: > Removes the abstraction layer to support multiple executable binaries. > These days all our architectures are ELF and this would allows us to > reuse the ELF parsing code more easily. > > Diff below includes the db_sifting() removal. > > ok? It would be great if others could help mpi@ move forward with this. The patch is pretty straightforward and looks ok to me, just one comment below. > Index: db_elf.c > === > Index: db_hangman.c > === ok > Index: db_sym.c > === > RCS file: /cvs/src/sys/ddb/db_sym.c,v > retrieving revision 1.41 > diff -u -p -r1.41 db_sym.c > --- db_sym.c 25 Jan 2016 14:50:13 - 1.41 > +++ db_sym.c 25 Jan 2016 15:02:05 - > @@ -52,30 +52,10 @@ db_symtab_t db_symtabs[MAXNOSYMTABS] = { > > db_symtab_t *db_last_symtab; > > -static db_forall_func_t db_sift; > - > extern char end[]; > > -/* > - * Put the most picky symbol table formats at the top! > - */ > -const db_symformat_t *db_symformats[] = { > - _symformat_elf, > - NULL, > -}; > - > -const db_symformat_t *db_symformat; > - > -boolean_tX_db_sym_init(int, void *, void *, const char *); > -db_sym_t X_db_lookup(db_symtab_t *, char *); > -db_sym_t X_db_search_symbol(db_symtab_t *, db_addr_t, > - db_strategy_t, db_expr_t *); > -void X_db_symbol_values(db_symtab_t *, db_sym_t, char **, > - db_expr_t *); > boolean_tX_db_line_at_pc(db_symtab_t *, db_sym_t, char **, > int *, db_expr_t); > -int X_db_sym_numargs(db_symtab_t *, db_sym_t, int *, > - char **); The X_db_line_at_pc() prototype should also be removed. Otherwise ok > Index: db_sym.h > === ok
Re: Signed overflow in ufs i_modrev calculation
On 27 January 2016 at 14:21, Martin Natanowrote: > On Wed, Jan 27, 2016 at 12:27:46PM +0100, Mike Belopuhov wrote: >> On 27 January 2016 at 09:52, Martin Natano wrote: >> > In ufs, the calculation of i_modrev can produce signed overflow on 32 >> > bit architectures (found on i386). The tv.tv_usec * 4294 calculation is >> > designed to move the microseconds part of a struct timeval to the upper >> > bits of an unsigned(!) 32 bit value to make room for simple i_modrev >> > increments, but the calculation is performed signed, causing overflow. >> > The diff below gets rid of the overflow by casting to unsigned first. >> > >> > While there I replaced the union _qcvt/SETHIGH/SETLOW dance with simple >> > bitshift operations. >> > >> >> NetBSD have fixed this a while ago with a different construct >> that produces different results compared to your code: >> >> http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/ufs/ufs/ufs_vnops.c.diff?r1=1.105=1.107 >> >> Basically the difference is that you propagate carry bits into the upper >> part while neither current code nor NetBSD code do. Can you please >> post an example you've used to test this? > > There won't be any carry. tv_usec contains the microsecond part of a > timestamp, so the expected range is [0, 1,000,000). 999,999 * 4294 is > less than 2^32. > Fair enough. I didn't realize that there was an upper bound on the value of usec, but it makes sense. > >> But curiosity took the better of me. Why do we have to multiply >> microseconds by 4294? Does this number come from 0x/(1000*1000)? > > Yes, 4294 is the largest factor for which the assumption that > tv_usec * factor < 2^32 holds true. > I see now. Thanks for an explanation. >> FreeBSD did something completely different here: >> >> http://bxr.su/FreeBSD/sys/ufs/ffs/ffs_softdep.c#2681 >> http://bxr.su/FreeBSD/sys/fs/ext2fs/ext2_vnops.c#1515 >> http://bxr.su/FreeBSD/sys/kern/vfs_subr.c#4317 >> >> Since it's an NFS revision thing the lower part can be anything, >> including as simple as (usec &~ 0x) to make some room for the >> counter... I don't think propagating carry bits into the upper >> part makes much sense. > > I don't think (usec &~ 0x) would be a good idea. The purpose of > multiplying usec is to make room, such that it is unlikely that > i_modrev will jump backwards when it is set again after a couple of > i_modrev++. Also, &~ 0x would just waste the upper 12 bits of the > lower half of i_modrev (always zero). > > cheers, > natano
Re: Don't wrap the cursor in tmux in copy mode
Hi tmux copy mode is not meant to work like vi, it is meant to work like emacs, but emacs does do this so we can change it. However, your diff is wrong. It prevents the cursor moving back when it is at 0,0 _on screen_. But if there is more than one screen worth of history, a left at 0,0 on screen should scroll up one line in the history. You can do something like "jot 1000" to generate plenty of history. On Tue, Jan 26, 2016 at 04:32:39PM +0100, Michal Mazurek wrote: > If the cursor is in position 0, 0 in copy mode, and the left arrow is > pressed, the cursor position is wrapped to the end of line. A similar > situation occurs at the last position and the right arrow. The following > patch prevents that, and makes the behaviour more consistent with other > software, such as nvi: > > > Index: window-copy.c > === > RCS file: /cvs/src/usr.bin/tmux/window-copy.c,v > retrieving revision 1.144 > diff -u -p -r1.144 window-copy.c > --- window-copy.c 19 Jan 2016 15:59:12 - 1.144 > +++ window-copy.c 26 Jan 2016 11:43:38 - > @@ -1776,10 +1776,10 @@ window_copy_cursor_left(struct window_pa > { > struct window_copy_mode_data*data = wp->modedata; > > - if (data->cx == 0) { > + if (data->cx == 0 && data->cy > 0) { > window_copy_cursor_up(wp, 0); > window_copy_cursor_end_of_line(wp); > - } else { > + } else if (data->cx > 0) { > window_copy_update_cursor(wp, data->cx - 1, data->cy); > if (window_copy_update_selection(wp, 1)) > window_copy_redraw_lines(wp, data->cy, 1); > @@ -1799,10 +1799,10 @@ window_copy_cursor_right(struct window_p > px = window_copy_find_length(wp, py); > } > > - if (data->cx >= px) { > + if (data->cx >= px && data->cy < screen_size_y(>screen) - 1) { > window_copy_cursor_start_of_line(wp); > window_copy_cursor_down(wp, 0); > - } else { > + } else if (data->cx < px) { > window_copy_update_cursor(wp, data->cx + 1, data->cy); > if (window_copy_update_selection(wp, 1)) > window_copy_redraw_lines(wp, data->cy, 1); > > > Also remove two unused variables (no binary change): > > Index: cmd-swap-pane.c > === > RCS file: /cvs/src/usr.bin/tmux/cmd-swap-pane.c,v > retrieving revision 1.25 > diff -u -p -r1.25 cmd-swap-pane.c > --- cmd-swap-pane.c 19 Jan 2016 15:59:12 - 1.25 > +++ cmd-swap-pane.c 26 Jan 2016 15:26:14 - > @@ -45,28 +45,23 @@ const struct cmd_entry cmd_swap_pane_ent > enum cmd_retval > cmd_swap_pane_exec(struct cmd *self, struct cmd_q *cmdq) > { > - struct winlink *src_wl, *dst_wl; > struct window *src_w, *dst_w; > struct window_pane *tmp_wp, *src_wp, *dst_wp; > struct layout_cell *src_lc, *dst_lc; > u_intsx, sy, xoff, yoff; > > - dst_wl = cmdq->state.tflag.wl; > - dst_w = dst_wl->window; > + dst_w = cmdq->state.tflag.wl->window; > dst_wp = cmdq->state.tflag.wp; > - src_wl = cmdq->state.sflag.wl; > - src_w = src_wl->window; > + src_w = cmdq->state.sflag.wl->window; > src_wp = cmdq->state.sflag.wp; > server_unzoom_window(dst_w); > > if (args_has(self->args, 'D')) { > - src_wl = dst_wl; > src_w = dst_w; > src_wp = TAILQ_NEXT(dst_wp, entry); > if (src_wp == NULL) > src_wp = TAILQ_FIRST(_w->panes); > } else if (args_has(self->args, 'U')) { > - src_wl = dst_wl; > src_w = dst_w; > src_wp = TAILQ_PREV(dst_wp, window_panes, entry); > if (src_wp == NULL) > > -- > Michal Mazurek >