change %T → %t still used for human-readable time formatting change %τ → %T (compatability with nix and /sys/src/9 kernels.) used for tbdf formatting. Reference: /n/atom/patch/applied2013/fstimefmt Date: Sat Sep 14 20:54:13 CES 2013 Signed-off-by: quanstro@quanstro.net --- /sys/src/fs/port/9p2.c Sat Sep 14 20:50:12 2013 +++ /sys/src/fs/port/9p2.c Sat Sep 14 20:50:16 2013 @@ -361,7 +361,7 @@ out: if((cons.flags & attachflag) && error) - print("9p2: auth %s %T SUCK EGGS --- %s\n", f->uname, time(), errstr9p[error]); + print("9p2: auth %s %t SUCK EGGS --- %s\n", f->uname, time(), errstr9p[error]); if(file != nil){ qunlock(file); if(error) @@ -493,12 +493,12 @@ strncpy(chan->whoname, f->uname, sizeof(chan->whoname)); chan->whotime = time(); if(cons.flags & attachflag) - print("9p2: attach %s %T to \"%s\" C%d\n", + print("9p2: attach %s %t to \"%s\" C%d\n", chan->whoname, chan->whotime, fs->name, chan->chan); out: if((cons.flags & attachflag) && error) - print("9p2: attach %s %T SUCK EGGS --- %s\n", + print("9p2: attach %s %t SUCK EGGS --- %s\n", f->uname, time(), errstr9p[error]); if(p) putbuf(p); --- /sys/src/fs/port/con.c Sat Sep 14 20:50:20 2013 +++ /sys/src/fs/port/con.c Sat Sep 14 20:50:21 2013 @@ -654,8 +654,8 @@ cmd_version(int, char *[]) { - print("%d-bit %s compiled %T\n", sizeof(Off)*8 - 1, service, mktime); - print("\tlast boot %T\n", boottime); + print("%d-bit %s compiled %t\n", sizeof(Off)*8 - 1, service, mktime); + print("\tlast boot %t\n", boottime); } static --- /sys/src/fs/port/time.c Sat Sep 14 20:50:23 2013 +++ /sys/src/fs/port/time.c Sat Sep 14 20:50:25 2013 @@ -183,9 +183,9 @@ t = time(); if(tim.bias >= 0) - print("%T + %ld\n", t, tim.bias); + print("%t + %ld\n", t, tim.bias); else - print("%T - %ld\n", t, -tim.bias); + print("%t - %ld\n", t, -tim.bias); } static int dysize(int); @@ -307,7 +307,7 @@ } int -Tfmt(Fmt* fmt) +tfmt(Fmt* fmt) { char s[30]; char *cp; --- /sys/src/fs/port/main.c Sat Sep 14 20:50:28 2013 +++ /sys/src/fs/port/main.c Sat Sep 14 20:50:29 2013 @@ -313,7 +313,7 @@ launchhalt(); - print("halted at %T.\npress a key to reboot sooner than %d mins.\n", + print("halted at %t.\npress a key to reboot sooner than %d mins.\n", time(), Keydelay/60); /* reboot after delay (for debugging) or at key press */ @@ -338,7 +338,7 @@ n = nextime(t+MINUTE(100), DUMPTIME, WEEKMASK); if(!conf.nodump) - print("next dump at %T\n", n); + print("next dump at %t\n", n); return n; } @@ -382,7 +382,7 @@ } if(!conf.nodump) if(t > nddate){ - print("automatic dump %T\n", t); + print("automatic dump %t\n", t); for(fs=filsys; fs->name; fs++) if(fs->dev->type == Devcw) cfsdump(fs); --- /sys/src/fs/port/rawcopy.c Sat Sep 14 20:50:31 2013 +++ /sys/src/fs/port/rawcopy.c Sat Sep 14 20:50:33 2013 @@ -73,7 +73,7 @@ } mbfree(b); t = Ticks-d->t0; - print("rawcopy: halt %T\n", time()); + print("rawcopy: halt %t\n", time()); print("copied %lld blocks from %Z to %Z\n", (d->p-d->start), d->from, d->to); print("\t" "%,ld ticks\n", t); if(t) --- /sys/src/fs/port/devcopy.c Sat Sep 14 20:50:35 2013 +++ /sys/src/fs/port/devcopy.c Sat Sep 14 20:50:36 2013 @@ -90,7 +90,7 @@ putbuf(b); } t = Ticks-d->t0; - print("devcopy: halt %T\n", time()); + print("devcopy: halt %t\n", time()); print("copied %lld blocks from %Z to %Z\n", d->p-d->start, d->from, d->to); print("\t" "%,ld ticks\n", t); if(t) --- /sys/src/fs/port/portfns.h Sat Sep 14 20:50:39 2013 +++ /sys/src/fs/port/portfns.h Sat Sep 14 20:50:41 2013 @@ -251,7 +251,7 @@ int syncblock(void); long syscall(Ureg*); void sysinit(void); -int Tfmt(Fmt*); +int tfmt(Fmt*); Timet time(void); Timet nextime(Timet, int, int); Tlock* tlocked(Iobuf*, Dentry*); --- /sys/src/fs/port/sub.c Sat Sep 14 20:50:44 2013 +++ /sys/src/fs/port/sub.c Sat Sep 14 20:50:45 2013 @@ -798,7 +798,7 @@ fmtinstall('W', Wfmt); /* print filters */ fmtinstall('w', wfmt); /* " */ fmtinstall('G', Gfmt); /* print tags */ - fmtinstall('T', Tfmt); /* print times */ + fmtinstall('t', tfmt); /* print times */ fmtinstall('E', Efmt); /* print ether addresses */ fmtinstall('I', Ifmt); /* print ip addresses */ fmtinstall(L'φ', φfmt); /* print ip flags */ --- /sys/src/fs/port/portdat.h Sat Sep 14 20:50:49 2013 +++ /sys/src/fs/port/portdat.h Sat Sep 14 20:50:51 2013 @@ -617,6 +617,7 @@ long nlock; long delaysched; + Lock *lstack[NHAS]; uintptr pstack[NHAS]; @@ -929,7 +930,7 @@ Cons cons; #pragma varargck type "Z" Device* -#pragma varargck type "T" Timet +#pragma varargck type "t" Timet #pragma varargck type "I" uchar* #pragma varargck type "E" uchar* #pragma varargck type "W" Filter* --- /sys/src/fs/ip/sntp.c Sat Sep 14 20:50:53 2013 +++ /sys/src/fs/ip/sntp.c Sat Sep 14 20:50:55 2013 @@ -120,7 +120,7 @@ if(dt < 0) dt = -dt; if(dt > 1 || (cons.flags&sntp.flag)) - print("sntp: %T [adjust %+ld]\n", now, (long)dt); + print("sntp: %t [adjust %+ld]\n", now, (long)dt); } sntp.gotreply = 1; wakeup(&sntp.r); --- /sys/src/fs/pc/ether82598.c Sat Sep 14 20:50:58 2013 +++ /sys/src/fs/pc/ether82598.c Sat Sep 14 20:51:00 2013 @@ -960,13 +960,13 @@ } name = cttab[type].name; if(nctlr == nelem(ctlrtab)){ - print("%s: %τ: too many controllers\n", name, p->tbdf); + print("%s: %T: too many controllers\n", name, p->tbdf); return; } io = p->mem[0].bar&~0xf; mem = vmap(io, p->mem[0].size); if(mem == 0){ - print("%s: %τ: cant map bar\n", name, p->tbdf); + print("%s: %T: cant map bar\n", name, p->tbdf); continue; } c = ialloc(sizeof *c, 0); @@ -976,7 +976,7 @@ c->rbsz = cttab[type].mtu; c->type = type; if(reset(c)){ - print("%s: %τ: cant reset\n", name, p->tbdf); + print("%s: %T: cant reset\n", name, p->tbdf); // free(c); // vunmap(mem, p->mem[0].size); continue; --- /sys/src/fs/pc/archdat.h Sat Sep 14 20:51:02 2013 +++ /sys/src/fs/pc/archdat.h Sat Sep 14 20:51:04 2013 @@ -19,7 +19,7 @@ #pragma incomplete Pcidev #pragma varargck type "P" uintmem -#pragma varargck type "τ" int +#pragma varargck type "T" int struct Lock { --- /sys/src/fs/pc/io.h Sat Sep 14 20:51:08 2013 +++ /sys/src/fs/pc/io.h Sat Sep 14 20:51:09 2013 @@ -248,7 +248,6 @@ extern void pcireset(void); extern void pcisetbme(Pcidev*); extern void pciclrbme(Pcidev*); -#pragma varargck type "τ" int /* * a parsed plan9.ini line --- /sys/src/fs/pc/pci.c Sat Sep 14 20:51:13 2013 +++ /sys/src/fs/pc/pci.c Sat Sep 14 20:51:15 2013 @@ -112,7 +112,7 @@ ioa = *pioa; mema = *pmema; -// dprint("pcibusmap wr=%d %τ mem=%luX io=%luX\n", +// dprint("pcibusmap wr=%d %T mem=%luX io=%luX\n", // wrreg, root->tbdf, mema, ioa); dprint("pcibusmap wr=%d %x mem=%lux io=%lux\n", wrreg, root->tbdf, mema, ioa); @@ -132,7 +132,7 @@ if(p->ccrb == 0x06) { if(p->ccru != 0x04 || p->bridge == nil) { print("pci: ignored bridge p->tbdf\n"); -// DBG("pci: ignored bridge %τ\n", p->tbdf); +// DBG("pci: ignored bridge %T\n", p->tbdf); continue; } @@ -632,10 +632,8 @@ uchar checksum; }; -#pragma varargck type "τ" int - static int -τfmt(Fmt* fmt) +Tfmt(Fmt* fmt) { char buf[32], *p, *e; int type, tbdf; @@ -674,14 +672,14 @@ r = (Router *)p; - fmtinstall(L'τ', τfmt); + fmtinstall(L'T', Tfmt); print("PCI interrupt routing table version %d.%d at %.6lux\n", r->version[0], r->version[1], (uintptr)r & 0xfffff); tbdf = (BusPCI << 24)|(r->bus << 16)|(r->devfn << 8); sbpci = pcimatchtbdf(tbdf); if(sbpci == nil) { - print("pcirouting: Cannot find south bridge %τ\n", tbdf); + print("pcirouting: Cannot find south bridge %T\n", tbdf); return; } @@ -690,7 +688,7 @@ break; if(i == nelem(southbridges)) { - print("pcirouting: ignoring south bridge %τ %.4ux/%.4ux\n", tbdf, sbpci->vid, sbpci->did); + print("pcirouting: ignoring south bridge %T %.4ux/%.4ux\n", tbdf, sbpci->vid, sbpci->did); return; } southbridge = &southbridges[i]; @@ -725,12 +723,12 @@ if(irq == 0 || irq == pci->intl) continue; if(pci->intl != 0 && pci->intl != 0xFF) { - print("pcirouting: BIOS workaround: %τ at pin %d link %d irq %d -> %d\n", + print("pcirouting: BIOS workaround: %T at pin %d link %d irq %d -> %d\n", tbdf, pin, link, irq, pci->intl); southbridge->set(sbpci, link, pci->intl); continue; } - print("pcirouting: %τ at pin %d link %d irq %d\n", tbdf, pin, link, irq); + print("pcirouting: %T at pin %d link %d irq %d\n", tbdf, pin, link, irq); pcicfgw8(pci, PciINTL, irq); pci->intl = irq; } --- /sys/src/fs/amd64/ether82563.c Sat Sep 14 20:51:19 2013 +++ /sys/src/fs/amd64/ether82563.c Sat Sep 14 20:51:22 2013 @@ -1265,7 +1265,7 @@ { Ctlr *ctlr; Ether *edev; - int icr, im; + u32int icr, im; edev = arg; ctlr = edev->ctlr; @@ -1665,6 +1665,7 @@ return -1; } p = ctlr->pcidev; + pcisetbme(ctlr->pcidev); ctlr->nic = vmap(ctlr->port, p->mem[0].size); if(ctlr->nic == nil){ print("%s: can't map %#P\n", cname(ctlr), ctlr->port); @@ -1674,7 +1675,6 @@ vunmap(ctlr->nic, p->mem[0].size); return -1; } - pcisetbme(ctlr->pcidev); return 0; } --- /sys/src/fs/amd64/pci.c Sat Sep 14 20:51:25 2013 +++ /sys/src/fs/amd64/pci.c Sat Sep 14 20:51:27 2013 @@ -224,7 +224,7 @@ ubn = pcicfgr8(p, PciUBN); if(sbn == 0 || ubn == 0) { - print("%τ: unconfigured bridge\n", p->tbdf); + print("%T: unconfigured bridge\n", p->tbdf); sbn = maxubn+1; /* @@ -331,10 +331,10 @@ uchar checksum; }; -#pragma varargck type "τ" int +#pragma varargck type "T" int static int -τfmt(Fmt* fmt) +Tfmt(Fmt* fmt) { char buf[32], *p, *e; int type, tbdf; @@ -376,7 +376,7 @@ r = (Router *)p; - fmtinstall(L'τ', τfmt); + fmtinstall(L'T', Tfmt); if(0) print("PCI interrupt routing table version %d.%d at %.6llux\n", r->version[0], r->version[1], (uintptr)r & 0xfffff); @@ -384,7 +384,7 @@ tbdf = (BusPCI << 24)|(r->bus << 16)|(r->devfn << 8); sbpci = pcimatchtbdf(tbdf); if(sbpci == nil) { - print("pcirouting: Cannot find south bridge %τ\n", tbdf); + print("pcirouting: Cannot find south bridge %T\n", tbdf); return; } @@ -394,7 +394,7 @@ break; if(i == nelem(southbridges)) { - print("pcirouting: ignoring south bridge %τ %.4ux/%.4ux\n", tbdf, sbpci->vid, sbpci->did); + print("pcirouting: ignoring south bridge %T %.4ux/%.4ux\n", tbdf, sbpci->vid, sbpci->did); return; } southbridge = &southbridges[i]; @@ -428,12 +428,12 @@ if(irq == 0 || irq == pci->intl) continue; if(pci->intl != 0 && pci->intl != 0xFF) { - print("pcirouting: %τ at pin %d link %d irq %d -> %d\n", + print("pcirouting: %T at pin %d link %d irq %d -> %d\n", tbdf, pin, link, irq, pci->intl); southbridge->set(sbpci, link, pci->intl); continue; } - print("pcirouting: %τ at pin %d link %d irq %d\n", tbdf, pin, link, irq); + print("pcirouting: %T at pin %d link %d irq %d\n", tbdf, pin, link, irq); pcicfgw8(pci, PciINTL, irq); pci->intl = irq; } @@ -471,7 +471,7 @@ cmd_install("pcihinv", "-- pci inventory", cmd_pcihinv); -// fmtinstall('τ', fmtT); +// fmtinstall('T', fmtT); /* * Try to determine if PCI Mode1 configuration implemented. --- /sys/src/fs/amd64/ioapic.c Sat Sep 14 20:51:29 2013 +++ /sys/src/fs/amd64/ioapic.c Sat Sep 14 20:51:30 2013 @@ -395,7 +395,7 @@ v->type = "msi"; v->mask = msimask; - DBG("msiirq: %τ: enabling %.16llux %s irq %d vno %d\n", p->tbdf, msivec, v->name, v->irq, vno); + DBG("msiirq: %T: enabling %.16llux %s irq %d vno %d\n", p->tbdf, msivec, v->name, v->irq, vno); return vno; } @@ -444,19 +444,19 @@ busno = BUSBNO(v->tbdf); if((pcidev = pcimatchtbdf(v->tbdf)) == nil) - panic("no PCI dev for tbdf %τ", v->tbdf); + panic("no PCI dev for tbdf %T", v->tbdf); if((vecno = intrenablemsi(v, pcidev)) != -1) return vecno; disablemsi(v, pcidev); if((devno = pcicfgr8(pcidev, PciINTP)) == 0) - panic("no INTP for tbdf %τ", v->tbdf); + panic("no INTP for tbdf %T", v->tbdf); devno = BUSDNO(v->tbdf)<<2|(devno-1); - DBG("ioapicintrenable: tbdf %τ busno %d devno %d\n", + DBG("ioapicintrenable: tbdf %T busno %d devno %d\n", v->tbdf, busno, devno); } else{ SET(busno, devno); - panic("unknown tbdf %τ", v->tbdf); + panic("unknown tbdf %T", v->tbdf); } rdt = nil; @@ -480,7 +480,7 @@ rdt = rbus->rdt; break; } - DBG("isa: tbdf %τ busno %d devno %d %#p\n", + DBG("isa: tbdf %T busno %d devno %d %#p\n", v->tbdf, busno, devno, rdt); } if(rdt == nil) @@ -492,13 +492,13 @@ * rather than putting a Lock in each entry. */ lock(rdt->apic); - DBG("%τ: %ld/%d/%d (%d)\n", v->tbdf, rdt->apic - xioapic, rbus->devno, rdt->intin, devno); + DBG("%T: %ld/%d/%d (%d)\n", v->tbdf, rdt->apic - xioapic, rbus->devno, rdt->intin, devno); if((rdt->lo & 0xff) == 0){ vecno = nextvec(); rdt->lo |= vecno; rdtvecno[vecno] = rdt; }else - DBG("%τ: mutiple irq bus %d dev %d\n", v->tbdf, busno, devno); + DBG("%T: mutiple irq bus %d dev %d\n", v->tbdf, busno, devno); rdt->enabled++; lo = (rdt->lo & ~Im); --- /sys/src/fs/amd64/ether82598.c Sat Sep 14 20:51:33 2013 +++ /sys/src/fs/amd64/ether82598.c Sat Sep 14 20:51:35 2013 @@ -923,13 +923,13 @@ } name = cttab[type].name; if(nctlr == nelem(ctlrtab)){ - print("%s: %τ: too many controllers\n", name, p->tbdf); + print("%s: %T: too many controllers\n", name, p->tbdf); return; } io = p->mem[0].bar&~0xf; mem = vmap(io, p->mem[0].size); if(mem == 0){ - print("%s: %τ: cant map bar\n", name, p->tbdf); + print("%s: %T: cant map bar\n", name, p->tbdf); continue; } c = ialloc(sizeof *c, 0); @@ -939,7 +939,7 @@ c->rbsz = cttab[type].mtu; c->type = type; if(reset(c)){ - print("%s: %τ: cant reset\n", name, p->tbdf); + print("%s: %T: cant reset\n", name, p->tbdf); // free(c); // vunmap(mem, p->mem[0].size); continue; --- /sys/src/fs/amd64/trap.c Sat Sep 14 20:51:38 2013 +++ /sys/src/fs/amd64/trap.c Sat Sep 14 20:51:40 2013 @@ -528,7 +528,7 @@ } else{ snprint(aff, sizeof aff, "%d", v->affinity); - snprint(tbdf, sizeof tbdf, "%τ", v->tbdf); + snprint(tbdf, sizeof tbdf, "%T", v->tbdf); } print("%s%d %s %-16s %-10lld %-18lld %s %s\n", prefix, i, aff, tbdf, t->count, t->cycles, v->type, v->name); --- /sys/src/fs/amd64/acpi.c Sat Sep 14 20:51:44 2013 +++ /sys/src/fs/amd64/acpi.c Sat Sep 14 20:51:46 2013 @@ -426,11 +426,11 @@ tbdf = MKBUS(BusPCI, bno, adr>>16, adr&0xFFFF); pdev = pcimatchtbdf(tbdf); if(pdev == nil){ - DBG("acpi: pcibusno: bridge not found: %τ\n", tbdf); + DBG("acpi: pcibusno: bridge not found: %T\n", tbdf); return -1; } if(pdev->bridge == nil){ - DBG("acpi: pcibusno: nothing bridged: %τ\n", tbdf); + DBG("acpi: pcibusno: nothing bridged: %T\n", tbdf); return -1; } return BUSBNO(pdev->bridge->tbdf); --- /sys/src/fs/amd64/archdat.h Sat Sep 14 20:51:48 2013 +++ /sys/src/fs/amd64/archdat.h Sat Sep 14 20:51:49 2013 @@ -24,7 +24,7 @@ #pragma incomplete Pcidev #pragma varargck type "P" uintmem -#pragma varargck type "τ" int +#pragma varargck type "T" int enum {