Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4681 → Rev 4682

/trunk/uspace/app/bdsh/cmds/modules/cp/cp.c
172,7 → 172,8
 
int cmd_cp(char **argv)
{
unsigned int argc, buffer = 0, verbose = 0;
unsigned int argc, verbose = 0;
int buffer = 0;
int c, opt_ind;
int64_t ret;
 
/trunk/uspace/app/bdsh/cmds/modules/ls/ls.c
89,7 → 89,8
struct stat s;
int rc;
 
if (rc = stat(pathname, &s)) {
rc = stat(pathname, &s);
if (rc != 0) {
/* Odd chance it was deleted from the time readdir() found it */
printf("ls: skipping bogus node %s\n", pathname);
printf("rc=%d\n", rc);
/trunk/uspace/app/bdsh/cmds/modules/ls/ls.h
6,8 → 6,6
#define LS_FILE 1
#define LS_DIR 2
 
 
static unsigned int ls_scope(const char *);
static void ls_scan_dir(const char *, DIR *);
static void ls_print(const char *, const char *);
 
/trunk/uspace/app/bdsh/cmds/modules/rm/rm.c
209,7 → 209,7
}
}
 
if (optind == argc) {
if ((unsigned) optind == argc) {
cli_error(CL_EFAIL,
"%s: insufficient arguments. Try %s --help", cmdname, cmdname);
rm_end(&rm);
/trunk/uspace/srv/pci/libpci/i386-ports.c
79,14 → 79,14
d.func = 0;
for (d.dev = 0; d.dev < 32; d.dev++) {
u16 class, vendor;
if (m->read(&d, PCI_CLASS_DEVICE, (byte *) & class,
if ((m->read(&d, PCI_CLASS_DEVICE, (byte *) & class,
sizeof(class))
&& (class == cpu_to_le16(PCI_CLASS_BRIDGE_HOST)
|| class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA))
|| m->read(&d, PCI_VENDOR_ID, (byte *) & vendor,
|| class == cpu_to_le16(PCI_CLASS_DISPLAY_VGA)))
|| (m->read(&d, PCI_VENDOR_ID, (byte *) & vendor,
sizeof(vendor))
&& (vendor == cpu_to_le16(PCI_VENDOR_ID_INTEL)
|| vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ))) {
|| vendor == cpu_to_le16(PCI_VENDOR_ID_COMPAQ)))) {
a->debug("...outside the Asylum at 0/%02x/0",
d.dev);
return 1;
/trunk/uspace/srv/pci/libpci/names.c
150,7 → 150,7
int cat = -1;
int nest;
static const char parse_error[] = "Parse error";
int i;
size_t i;
 
*lino = 0;
for (i = 0; i < sizeof(pci_ids) / sizeof(char *); i++) {
330,7 → 330,7
iv = va_arg(args, int);
if (num)
res = snprintf(buf, size, "%04x", iv);
else if (v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0))
else if ((v = id_lookup(a, ID_VENDOR, iv, 0, 0, 0)) != 0)
return (char *) v->name;
else
res = snprintf(buf, size, "Unknown vendor %04x", iv);
340,7 → 340,7
id = va_arg(args, int);
if (num)
res = snprintf(buf, size, "%04x", id);
else if (d = id_lookup(a, ID_DEVICE, iv, id, 0, 0))
else if ((d = id_lookup(a, ID_DEVICE, iv, id, 0, 0)) != 0)
return (char *) d->name;
else if (synth)
res = snprintf(buf, size, "Unknown device %04x", id);
370,7 → 370,7
isv = va_arg(args, int);
if (num)
res = snprintf(buf, size, "%04x", isv);
else if (v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0))
else if ((v = id_lookup(a, ID_VENDOR, isv, 0, 0, 0)) != 0)
return (char *) v->name;
else if (synth)
res = snprintf(buf, size, "Unknown vendor %04x", isv);
384,7 → 384,7
isd = va_arg(args, int);
if (num)
res = snprintf(buf, size, "%04x", isd);
else if (d = id_lookup_subsys(a, iv, id, isv, isd))
else if ((d = id_lookup_subsys(a, iv, id, isv, isd)) != 0)
return (char *) d->name;
else if (synth)
res = snprintf(buf, size, "Unknown device %04x", isd);
415,9 → 415,9
icls = va_arg(args, int);
if (num)
res = snprintf(buf, size, "%04x", icls);
else if (cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0))
else if ((cls = id_lookup(a, ID_SUBCLASS, icls >> 8, icls & 0xff, 0, 0)) != 0)
return (char *) cls->name;
else if (cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0))
else if ((cls = id_lookup(a, ID_CLASS, icls, 0, 0, 0)) != 0)
res = snprintf(buf, size, "%s [%04x]", cls->name, icls);
else if (synth)
res = snprintf(buf, size, "Class %04x", icls);
429,7 → 429,7
ipif = va_arg(args, int);
if (num)
res = snprintf(buf, size, "%02x", ipif);
else if (pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0))
else if ((pif = id_lookup(a, ID_PROGIF, icls >> 8, icls & 0xff, ipif, 0)) != 0)
return (char *) pif->name;
else if (icls == 0x0101 && !(ipif & 0x70)) {
/* IDE controllers have complex prog-if semantics */
/trunk/uspace/srv/pci/libpci/generic.c
29,7 → 29,7
for (dev = 0; dev < 32; dev++) {
t->dev = dev;
multi = 0;
for (t->func = 0; !t->func || multi && t->func < 8;
for (t->func = 0; !t->func || (multi && t->func < 8);
t->func++) {
u32 vd = pci_read_long(t, PCI_VENDOR_ID);
struct pci_dev *d;