if (package_edge->type == EDGE_CONFLICTS) {
const unsigned package_num =
search_package_hashtable(package_edge->name,
- package_edge->version,
- package_edge->operator);
+ package_edge->version,
+ package_edge->operator);
int result = 0;
if (package_hashtable[package_num] != NULL) {
status_num = search_status_hashtable(name_hashtable[package_hashtable[package_num]->name]);
*/
if (root_of_alternatives && package_edge->type != root_of_alternatives->type - 1)
bb_error_msg_and_die("fatal error, package dependencies corrupt: %d != %d - 1",
- package_edge->type, root_of_alternatives->type);
+ package_edge->type, root_of_alternatives->type);
if (package_hashtable[package_num] != NULL)
result = !package_satisfies_dependency(package_num, package_edge->type);
* must be all ones.
*/
Assert(code + G2.bl_count[MAX_BITS] - 1 == (1 << MAX_BITS) - 1,
- "inconsistent bit counts");
+ "inconsistent bit counts");
Tracev((stderr, "\ngen_codes: max_code %d ", max_code));
for (n = 0; n <= max_code; n++) {
}
out_length >>= 3;
Trace((stderr,
- "\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ",
- G2.last_lit, G2.last_dist, in_length, out_length,
- 100L - out_length * 100L / in_length));
+ "\nlast_lit %u, last_dist %u, in %ld, out ~%ld(%ld%%) ",
+ G2.last_lit, G2.last_dist, in_length, out_length,
+ 100L - out_length * 100L / in_length));
if (G2.last_dist < G2.last_lit / 2 && out_length < in_length / 2)
return 1;
}
static_lenb = (G2.static_len + 3 + 7) >> 3;
Trace((stderr,
- "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ",
- opt_lenb, G2.opt_len, static_lenb, G2.static_len, stored_len,
- G2.last_lit, G2.last_dist));
+ "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u dist %u ",
+ opt_lenb, G2.opt_len, static_lenb, G2.static_len, stored_len,
+ G2.last_lit, G2.last_dist));
if (static_lenb <= opt_lenb)
opt_lenb = static_lenb;
} else {
send_bits((DYN_TREES << 1) + eof, 3);
send_all_trees(G2.l_desc.max_code + 1, G2.d_desc.max_code + 1,
- max_blindex + 1);
+ max_blindex + 1);
compress_block((ct_data *) G2.dyn_ltree, (ct_data *) G2.dyn_dtree);
G2.compressed_len += 3 + G2.opt_len;
}
// LZO_UNUSED(o_m3_a); LZO_UNUSED(o_m3_b);
*out_len = pd(op, out);
return (ip == ip_end ? LZO_E_OK :
- (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
+ (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN));
}
/**********************************************************************/
&& (filesize <= 0x3fffffffffffffffffffffffLL)
#endif
) {
- /* GNU tar uses "base-256 encoding" for very large numbers.
- * Encoding is binary, with highest bit always set as a marker
- * and sign in next-highest bit:
- * 80 00 .. 00 - zero
- * bf ff .. ff - largest positive number
- * ff ff .. ff - minus 1
- * c0 00 .. 00 - smallest negative number
+ /* GNU tar uses "base-256 encoding" for very large numbers.
+ * Encoding is binary, with highest bit always set as a marker
+ * and sign in next-highest bit:
+ * 80 00 .. 00 - zero
+ * bf ff .. ff - largest positive number
+ * ff ff .. ff - minus 1
+ * c0 00 .. 00 - smallest negative number
*/
char *p8 = header.size + sizeof(header.size);
do {
struct {
char fn;
char subarg;
- } arg = { 11, /* redirect kernel messages */
- 0 /* to specified console (current as default) */
- };
+ } arg = {
+ 11, /* redirect kernel messages */
+ 0 /* to specified console (current as default) */
+ };
if (argv[1])
arg.subarg = xatou_range(argv[1], 0, 63);
day_array(month, year, dp);
len = sprintf(lineout, "%s %d", month_names[month - 1], year);
printf("%*s%s\n%s\n",
- ((7*julian + WEEK_LEN) - len) / 2, "",
- lineout, day_headings);
+ ((7*julian + WEEK_LEN) - len) / 2, "",
+ lineout, day_headings);
for (row = 0; row < 6; row++) {
build_row(lineout, dp)[0] = '\0';
dp += 7;
if (opt & CUT_OPT_SUPPRESS_FLGS) {
bb_error_msg_and_die
("suppressing non-delimited lines makes sense%s",
- _op_on_field);
+ _op_on_field);
}
if (delim != '\t') {
bb_error_msg_and_die
/* From the manpage of df from coreutils-6.10:
Disk space is shown in 1K blocks by default, unless the environment
variable POSIXLY_CORRECT is set, in which case 512-byte blocks are used.
- */
+ */
if (getenv("POSIXLY_CORRECT")) /* TODO - a new libbb function? */
df_disp_hr = 512;
}
#else
if (printf("\n%-20s" + 1, device) > 20 && !(opt & OPT_POSIX))
- printf("\n%-20s", "");
+ printf("\n%-20s", "");
#endif
#if ENABLE_FEATURE_HUMAN_READABLE
/* Don't allow -n -r -nr -ug -rug -nug -rnug -uZ -gZ -GZ*/
/* Don't allow more than one username */
opt_complementary = "?1:u--g:g--u:G--u:u--G:g--G:G--g:r?ugG:n?ugG"
- IF_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G");
+ IF_SELINUX(":u--Z:Z--u:g--Z:Z--g:G--Z:Z--G");
opt = getopt32(argv, "rnugG" IF_SELINUX("Z"));
}
/* TODO: simple toggles may be stored as OPT_xxx bits instead */
static const uint32_t opt_flags[] = {
- STYLE_COLUMNAR, /* C */
+ STYLE_COLUMNAR, /* C */
DISP_HIDDEN | DISP_DOT, /* a */
DISP_NOLIST, /* d */
LIST_INO, /* i */
if ((option_mask32 & OPT_L) || force_follow) {
#if ENABLE_SELINUX
if (is_selinux_enabled()) {
- getfilecon(fullname, &cur->sid);
+ getfilecon(fullname, &cur->sid);
}
#endif
if (stat(fullname, &statbuf)) {
}
if (count_failed && !(flags & FLAG_SILENT)) {
bb_error_msg("WARNING: %d of %d computed checksums did NOT match",
- count_failed, count_total);
+ count_failed, count_total);
}
fclose_if_not_stdin(pre_computed_stream);
} else {
instance_list = inst->next;
if (verbose > 1)
printf("Finished with %s (exit status %d)\n",
- inst->device, status);
+ inst->device, status);
num_running--;
free_instance(inst);
if (verbose > 1)
printf("--waiting-- (pass %d)\n", passno);
status |= wait_many(pass_done ? FLAG_WAIT_ALL :
- FLAG_WAIT_ATLEAST_ONE);
+ FLAG_WAIT_ATLEAST_ONE);
if (pass_done) {
if (verbose > 1)
puts("----------------------------------");
IF_FEATURE_FIND_EXEC( "-exec\0" )
IF_FEATURE_FIND_PAREN( "(\0" )
/* All options/actions starting from here require argument */
- "-name\0"
- "-iname\0"
+ "-name\0"
+ "-iname\0"
IF_FEATURE_FIND_PATH( "-path\0" )
#if ENABLE_DESKTOP
IF_FEATURE_FIND_PATH( "-wholename\0")
// map the device in memory
G.addr = mmap(NULL,
- G.scr_var.yres * G.scr_fix.line_length,
+ G.scr_var.yres * G.scr_fix.line_length,
PROT_WRITE, MAP_SHARED, fbfd, 0);
if (G.addr == MAP_FAILED)
bb_perror_msg_and_die("mmap");
file = xopen(bb_path_wtmp_file, O_RDONLY);
printf("%-10s %-14s %-18s %-12.12s %s\n",
- "USER", "TTY", "HOST", "LOGIN", "TIME");
+ "USER", "TTY", "HOST", "LOGIN", "TIME");
/* yikes. We reverse over the file and that is a not too elegant way */
pos = xlseek(file, 0, SEEK_END);
pos = lseek(file, pos - sizeof(ut), SEEK_SET);
* but some systems have it wrong */
t_tmp = (time_t)ut.ut_tv.tv_sec;
printf("%-10s %-14s %-18s %-12.12s\n",
- ut.ut_user, ut.ut_line, ut.ut_host, ctime(&t_tmp) + 4);
+ ut.ut_user, ut.ut_line, ut.ut_host, ctime(&t_tmp) + 4);
next:
pos -= sizeof(ut);
if (pos <= 0)
} module_info;
static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARAM,
- void *data, int depth UNUSED_PARAM)
+ void *data, int depth UNUSED_PARAM)
{
char modname[MODULE_NAME_LEN];
module_info **first = (module_info **) data;
}
static void order_dep_list(module_info *modules, module_info *start,
- llist_t *add)
+ llist_t *add)
{
module_info *m;
llist_t *n;
} while (*++argv);
} else {
recursive_action(".", ACTION_RECURSE,
- parse_module, NULL, &modules, 0);
+ parse_module, NULL, &modules, 0);
}
/* Generate dependency and alias files */
/* Get the hardware address to a specified interface name */
static void arp_getdevhw(char *ifname, struct sockaddr *sa,
- const struct hwtype *hwt)
+ const struct hwtype *hwt)
{
struct ifreq ifr;
const struct hwtype *xhw;
xhw = get_hwntype(-1);
}
bb_error_msg("device '%s' has HW address %s '%s'",
- ifname, xhw->name,
- xhw->print((unsigned char *) &ifr.ifr_hwaddr.sa_data));
+ ifname, xhw->name,
+ xhw->print((unsigned char *) &ifr.ifr_hwaddr.sa_data));
}
}
/* Print the contents of an ARP request block. */
static void
arp_disp(const char *name, char *ip, int type, int arp_flags,
- char *hwa, char *mask, char *dev)
+ char *hwa, char *mask, char *dev)
{
static const int arp_masks[] = {
ATF_PERM, ATF_PUBL,
/* All these strings can't overflow
* because fgets above reads limited amount of data */
num = sscanf(line, "%s 0x%x 0x%x %s %s %s\n",
- ip, &type, &flags, hwa, mask, dev);
+ ip, &type, &flags, hwa, mask, dev);
if (num < 4)
break;
}
if (option_mask32 & ARP_OPT_v)
printf("Entries: %d\tSkipped: %d\tFound: %d\n",
- entries, entries - shown, shown);
+ entries, entries - shown, shown);
if (!shown) {
if (hw_set || host || device[0])
if (hw->alen <= 0) {
bb_error_msg_and_die("%s: %s without ARP support",
- hw->name, "hardware type");
+ hw->name, "hardware type");
}
/* Now see what we have to do here... */
{
unsigned char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data;
printf("The hardware address (SIOCGIFHWADDR) of %s is type %d "
- "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n\n", ifname,
- if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1],
- hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]);
+ "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n\n", ifname,
+ if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1],
+ hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]);
}
# endif
}
/* the line is not recognized */
config_error:
bb_error_msg("config error '%s' in '%s'", buf, filename);
- } /* while (fgets) */
+ } /* while (fgets) */
- fclose(f);
+ fclose(f);
}
#if ENABLE_FEATURE_HTTPD_ENCODE_URL_STR
case PAM_PROMPT_ECHO_OFF:
s = userinfo->pw;
break;
- case PAM_ERROR_MSG:
+ case PAM_ERROR_MSG:
case PAM_TEXT_INFO:
s = "";
break;
process_includes(include_directive);
/* Print everything after directive */
- if (end) {
+ if (end) {
fputs(end, stdout);
free(end);
}
}
#endif
memcpy( (((char *)&ifr) + a1op->ifr_offset),
- p, sizeof(struct sockaddr));
+ p, sizeof(struct sockaddr));
} else {
/* FIXME: error check?? */
unsigned long i = strtoul(*argv, NULL, 0);
(struct sockaddr *) &sap.sin6_addr);
sap.sin6_family = AF_INET6;
printf(" inet6 addr: %s/%d",
- INET6_sprint((struct sockaddr *) &sap, 1),
- plen);
+ INET6_sprint((struct sockaddr *) &sap, 1),
+ plen);
printf(" Scope:");
switch (scope & IPV6_ADDR_SCOPE_MASK) {
case 0:
if (ptr->has_ip) {
printf(" %s addr:%s ", ap->name,
- ap->sprint(&ptr->addr, 1));
+ ap->sprint(&ptr->addr, 1));
if (ptr->flags & IFF_POINTOPOINT) {
printf(" P-t-P:%s ", ap->sprint(&ptr->dstaddr, 1));
}
printf(" ");
printf("RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n",
- ptr->stats.rx_packets, ptr->stats.rx_errors,
- ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors,
- ptr->stats.rx_frame_errors);
+ ptr->stats.rx_packets, ptr->stats.rx_errors,
+ ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors,
+ ptr->stats.rx_frame_errors);
if (can_compress)
printf(" compressed:%lu\n",
- ptr->stats.rx_compressed);
+ ptr->stats.rx_compressed);
printf(" ");
printf("TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n",
- ptr->stats.tx_packets, ptr->stats.tx_errors,
- ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors,
- ptr->stats.tx_carrier_errors);
+ ptr->stats.tx_packets, ptr->stats.tx_errors,
+ ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors,
+ ptr->stats.tx_carrier_errors);
printf(" collisions:%lu ", ptr->stats.collisions);
if (can_compress)
printf("compressed:%lu ", ptr->stats.tx_compressed);
printf(" ");
if (ptr->map.irq)
printf("Interrupt:%d ", ptr->map.irq);
- if (ptr->map.base_addr >= 0x100) /* Only print devices using it for
- I/O maps */
+ if (ptr->map.base_addr >= 0x100) /* Only print devices using it for I/O maps */
printf("Base address:0x%lx ",
- (unsigned long) ptr->map.base_addr);
+ (unsigned long) ptr->map.base_addr);
if (ptr->map.mem_start) {
printf("Memory:%lx-%lx ", ptr->map.mem_start,
- ptr->map.mem_end);
+ ptr->map.mem_end);
}
if (ptr->map.dma)
printf("DMA chan:%x ", ptr->map.dma);
#ifdef UNUSED
static int for_all_interfaces(int (*doit) (struct interface *, void *),
- void *cookie)
+ void *cookie)
{
struct interface *ife;
/* getopt32 is _almost_ usable:
** it cannot handle "... -e PROG -prog-opt" */
while ((opt = getopt(argc, argv,
- "" IF_NC_SERVER("lp:") IF_NC_EXTRA("w:i:f:e:") )) > 0
+ "" IF_NC_SERVER("lp:") IF_NC_EXTRA("w:i:f:e:") )) > 0
) {
if (ENABLE_NC_SERVER && opt == 'l')
IF_NC_SERVER(do_listen++);
msg.m_status = G.stratum < MAXSTRAT ? G.ntp_status : LI_ALARM;
msg.m_status |= (query_status & VERSION_MASK);
msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ?
- MODE_SERVER : MODE_SYM_PAS;
+ MODE_SERVER : MODE_SYM_PAS;
msg.m_stratum = G.stratum;
msg.m_ppoll = G.poll_exp;
msg.m_precision_exp = G_precision_exp;
if (pps_enable) {
if (!(pll_status & STA_PPSTIME))
report_event(EVNT_KERN,
- NULL, "PPS enabled");
+ NULL, "PPS enabled");
ntv.status |= STA_PPSTIME | STA_PPSFREQ;
} else {
if (pll_status & STA_PPSTIME)
report_event(EVNT_KERN,
- NULL, "PPS disabled");
- ntv.status &= ~(STA_PPSTIME |
- STA_PPSFREQ);
+ NULL, "PPS disabled");
+ ntv.status &= ~(STA_PPSTIME | STA_PPSFREQ);
}
if (sys_leap == LEAP_ADDSECOND)
ntv.status |= STA_INS;
if (ntp_adjtime(&ntv) == TIME_ERROR) {
if (!(ntv.status & STA_PPSSIGNAL))
report_event(EVNT_KERN, NULL,
- "PPS no signal");
+ "PPS no signal");
}
pll_status = ntv.status;
#ifdef STA_NANO
msg.m_status = G.synced ? G.leap : LI_ALARM;
msg.m_status |= (query_status & VERSION_MASK);
msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ?
- MODE_SERVER : MODE_SYM_PAS;
+ MODE_SERVER : MODE_SYM_PAS;
msg.m_stratum = G.stratum;
msg.m_ppoll = query_ppoll;
msg.m_precision_exp = G_precision_exp;
ICMP6_FILTER_SETPASSALL(&filt);
}
if (setsockopt(pingsock, IPPROTO_ICMPV6, ICMP6_FILTER, &filt,
- sizeof(filt)) < 0)
+ sizeof(filt)) < 0)
bb_error_msg_and_die("setsockopt(ICMP6_FILTER)");
}
#endif /*ICMP6_FILTER*/
bb_error_msg_and_die("resolving %s", args_m1);
}
memcpy(&rt.rtmsg_gateway, sa6.sin6_addr.s6_addr,
- sizeof(struct in6_addr));
+ sizeof(struct in6_addr));
rt.rtmsg_flags |= RTF_GATEWAY;
continue;
}
FILE *fp = xfopen_for_read("/proc/net/route");
printf("Kernel IP routing table\n"
- "Destination Gateway Genmask Flags %s Iface\n",
+ "Destination Gateway Genmask Flags %s Iface\n",
netstatfmt ? " MSS Window irtt" : "Metric Ref Use");
if (fscanf(fp, "%*[^\n]\n") < 0) { /* Skip the first line. */
- goto ERROR; /* Empty or missing line, or read error. */
+ goto ERROR; /* Empty or missing line, or read error. */
}
while (1) {
int r;
FILE *fp = xfopen_for_read("/proc/net/ipv6_route");
printf("Kernel IPv6 routing table\n%-44s%-40s"
- "Flags Metric Ref Use Iface\n",
- "Destination", "Next Hop");
+ "Flags Metric Ref Use Iface\n",
+ "Destination", "Next Hop");
while (1) {
int r;
(struct sockaddr *) &snaddr6.sin6_addr);
snaddr6.sin6_family = AF_INET6;
naddr6 = INET6_rresolve((struct sockaddr_in6 *) &snaddr6,
- 0x0fff /* Apparently, upstream never resolves. */
- );
+ 0x0fff /* Apparently, upstream never resolves. */
+ );
if (!r) { /* 1st pass */
snprintf(addr6, sizeof(addr6), "%s/%d", naddr6, prefix_len);
* Get information about CPU using CPUID opcode.
*/
static void cpuid(unsigned int *eax, unsigned int *ebx, unsigned int *ecx,
- unsigned int *edx)
+ unsigned int *edx)
{
/* EAX value specifies what information to return */
__asm__(
continue; /* d_name is "." or ".." */
/* if path was ".", drop "./" prefix: */
retval |= sysctl_act_recursive((next[0] == '.' && next[1] == '/') ?
- next + 2 : next);
+ next + 2 : next);
free(next);
}
closedir(dirp);
#define OPTION_PARAM &opt_m, &(G.logFile.path), &opt_l \
IF_FEATURE_ROTATE_LOGFILE(,&opt_s) \
IF_FEATURE_ROTATE_LOGFILE(,&opt_b) \
- IF_FEATURE_REMOTE_LOG( ,&remoteAddrList) \
+ IF_FEATURE_REMOTE_LOG( ,&remoteAddrList) \
IF_FEATURE_IPC_SYSLOG( ,&opt_C) \
IF_FEATURE_SYSLOGD_CFG( ,&opt_f)
/* Check backwards so we don't need a counter */
while (--read_bytes >= 0) {
if (data[read_bytes] != FD_FILL_BYTE) {
- printf("bad data in cyl %d\nContinuing... ", cyl);
+ printf("bad data in cyl %d\nContinuing... ", cyl);
}
}
}
printf("\nThe current boot file is: %s\n",
sgi_get_bootfile());
if (read_maybe_empty("Please enter the name of the "
- "new boot file: ") == '\n')
+ "new boot file: ") == '\n')
printf("Boot file unchanged\n");
else
sgi_set_bootfile(line_ptr);
if (argv[1]) {
fd = open(argv[0], O_RDONLY|O_NOCTTY|O_CREAT, 0666);
if (fd < 0 && errno == EISDIR)
- fd = open(argv[0], O_RDONLY|O_NOCTTY);
+ fd = open(argv[0], O_RDONLY|O_NOCTTY);
if (fd < 0)
bb_perror_msg_and_die("can't open '%s'", argv[0]);
//TODO? close_on_exec_on(fd);
/* convert key to id */
id = ((c == 'q') ? msgget(key, 0) :
- (c == 'm') ? shmget(key, 0, 0) : semget(key, 0, 0));
+ (c == 'm') ? shmget(key, 0, 0) : semget(key, 0, 0));
if (id < 0) {
const char *errmsg;
}
result = ((c == 'q') ? msgctl(id, IPC_RMID, NULL) :
- (c == 'm') ? shmctl(id, IPC_RMID, NULL) :
- semctl(id, 0, IPC_RMID, arg));
+ (c == 'm') ? shmctl(id, IPC_RMID, NULL) :
+ semctl(id, 0, IPC_RMID, arg));
if (result) {
const char *errmsg;
/* glibc 2.1.3 and all earlier libc's have ints as fields
of struct shminfo; glibc 2.1.91 has unsigned long; ach */
printf("max number of segments = %lu\n"
- "max seg size (kbytes) = %lu\n"
- "max total shared memory (pages) = %lu\n"
- "min seg size (bytes) = %lu\n",
- (unsigned long) shminfo.shmmni,
- (unsigned long) (shminfo.shmmax >> 10),
- (unsigned long) shminfo.shmall,
- (unsigned long) shminfo.shmmin);
+ "max seg size (kbytes) = %lu\n"
+ "max total shared memory (pages) = %lu\n"
+ "min seg size (bytes) = %lu\n",
+ (unsigned long) shminfo.shmmni,
+ (unsigned long) (shminfo.shmmax >> 10),
+ (unsigned long) shminfo.shmall,
+ (unsigned long) shminfo.shmmin);
return;
case STATUS:
printf("------ Shared Memory %s --------\n", "Status");
- printf( "segments allocated %d\n"
- "pages allocated %ld\n"
- "pages resident %ld\n"
- "pages swapped %ld\n"
- "Swap performance: %ld attempts\t%ld successes\n",
- shm_info.used_ids,
- shm_info.shm_tot,
- shm_info.shm_rss,
- shm_info.shm_swp,
- shm_info.swap_attempts, shm_info.swap_successes);
+ printf("segments allocated %d\n"
+ "pages allocated %ld\n"
+ "pages resident %ld\n"
+ "pages swapped %ld\n"
+ "Swap performance: %ld attempts\t%ld successes\n",
+ shm_info.used_ids,
+ shm_info.shm_tot,
+ shm_info.shm_rss,
+ shm_info.shm_swp,
+ shm_info.swap_attempts, shm_info.swap_successes);
return;
case CREATOR:
printf("------ Shared Memory %s --------\n", "Segment Creators/Owners");
- printf( "%-10s %-10s %-10s %-10s %-10s %-10s\n",
- "shmid", "perms", "cuid", "cgid", "uid", "gid");
+ printf("%-10s %-10s %-10s %-10s %-10s %-10s\n",
+ "shmid", "perms", "cuid", "cgid", "uid", "gid");
break;
case TIME:
printf("------ Shared Memory %s --------\n", "Attach/Detach/Change Times");
- printf( "%-10s %-10s %-20s %-20s %-20s\n",
- "shmid", "owner", "attached", "detached", "changed");
+ printf("%-10s %-10s %-20s %-20s %-20s\n",
+ "shmid", "owner", "attached", "detached", "changed");
break;
case PID:
printf("------ Shared Memory %s --------\n", "Creator/Last-op");
- printf( "%-10s %-10s %-10s %-10s\n",
- "shmid", "owner", "cpid", "lpid");
+ printf("%-10s %-10s %-10s %-10s\n",
+ "shmid", "owner", "cpid", "lpid");
break;
default:
printf("------ Shared Memory %s --------\n", "Segments");
- printf( "%-10s %-10s %-10s %-10s %-10s %-10s %-12s\n",
- "key", "shmid", "owner", "perms", "bytes", "nattch",
- "status");
+ printf("%-10s %-10s %-10s %-10s %-10s %-10s %-12s\n",
+ "key", "shmid", "owner", "perms", "bytes", "nattch",
+ "status");
break;
}
printf("%-10d %-10d", shmid, ipcp->uid);
/* ctime uses static buffer: use separate calls */
printf(" %-20.16s", shmseg.shm_atime
- ? ctime(&shmseg.shm_atime) + 4 : "Not set");
+ ? ctime(&shmseg.shm_atime) + 4 : "Not set");
printf(" %-20.16s", shmseg.shm_dtime
- ? ctime(&shmseg.shm_dtime) + 4 : "Not set");
+ ? ctime(&shmseg.shm_dtime) + 4 : "Not set");
printf(" %-20.16s\n", shmseg.shm_ctime
- ? ctime(&shmseg.shm_ctime) + 4 : "Not set");
+ ? ctime(&shmseg.shm_ctime) + 4 : "Not set");
break;
case PID:
if (pw)
else
printf("%-10d %-10d", shmid, ipcp->uid);
printf(" %-10o %-10lu %-10ld %-6s %-6s\n", ipcp->mode & 0777,
- /*
- * earlier: int, Austin has size_t
- */
- (unsigned long) shmseg.shm_segsz,
- /*
- * glibc-2.1.3 and earlier has unsigned short;
- * Austin has shmatt_t
- */
- (long) shmseg.shm_nattch,
- ipcp->mode & SHM_DEST ? "dest" : " ",
- ipcp->mode & SHM_LOCKED ? "locked" : " ");
+ /*
+ * earlier: int, Austin has size_t
+ */
+ (unsigned long) shmseg.shm_segsz,
+ /*
+ * glibc-2.1.3 and earlier has unsigned short;
+ * Austin has shmatt_t
+ */
+ (long) shmseg.shm_nattch,
+ ipcp->mode & SHM_DEST ? "dest" : " ",
+ ipcp->mode & SHM_LOCKED ? "locked" : " ");
break;
}
}
if ((semctl(0, 0, IPC_INFO, arg)) < 0)
return;
printf("max number of arrays = %d\n"
- "max semaphores per array = %d\n"
- "max semaphores system wide = %d\n"
- "max ops per semop call = %d\n"
- "semaphore max value = %d\n",
- seminfo.semmni,
- seminfo.semmsl,
- seminfo.semmns, seminfo.semopm, seminfo.semvmx);
+ "max semaphores per array = %d\n"
+ "max semaphores system wide = %d\n"
+ "max ops per semop call = %d\n"
+ "semaphore max value = %d\n",
+ seminfo.semmni,
+ seminfo.semmsl,
+ seminfo.semmns, seminfo.semopm, seminfo.semvmx);
return;
case STATUS:
printf("------ Semaphore %s --------\n", "Status");
- printf( "used arrays = %d\n"
- "allocated semaphores = %d\n",
- seminfo.semusz, seminfo.semaem);
+ printf("used arrays = %d\n"
+ "allocated semaphores = %d\n",
+ seminfo.semusz, seminfo.semaem);
return;
case CREATOR:
printf("------ Semaphore %s --------\n", "Arrays Creators/Owners");
- printf( "%-10s %-10s %-10s %-10s %-10s %-10s\n",
- "semid", "perms", "cuid", "cgid", "uid", "gid");
+ printf("%-10s %-10s %-10s %-10s %-10s %-10s\n",
+ "semid", "perms", "cuid", "cgid", "uid", "gid");
break;
case TIME:
printf("------ Shared Memory %s --------\n", "Operation/Change Times");
- printf( "%-8s %-10s %-26.24s %-26.24s\n",
- "shmid", "owner", "last-op", "last-changed");
+ printf("%-8s %-10s %-26.24s %-26.24s\n",
+ "shmid", "owner", "last-op", "last-changed");
break;
case PID:
default:
printf("------ Semaphore %s --------\n", "Arrays");
- printf( "%-10s %-10s %-10s %-10s %-10s\n",
- "key", "semid", "owner", "perms", "nsems");
+ printf("%-10s %-10s %-10s %-10s %-10s\n",
+ "key", "semid", "owner", "perms", "nsems");
break;
}
printf("%-8d %-10d", semid, ipcp->uid);
/* ctime uses static buffer: use separate calls */
printf(" %-26.24s", semary.sem_otime
- ? ctime(&semary.sem_otime) : "Not set");
+ ? ctime(&semary.sem_otime) : "Not set");
printf(" %-26.24s\n", semary.sem_ctime
- ? ctime(&semary.sem_ctime) : "Not set");
+ ? ctime(&semary.sem_ctime) : "Not set");
break;
case PID:
break;
else
printf("%-10d %-9d", semid, ipcp->uid);
printf(" %-10o %-10ld\n", ipcp->mode & 0777,
- /*
- * glibc-2.1.3 and earlier has unsigned short;
- * glibc-2.1.91 has variation between
- * unsigned short and unsigned long
- * Austin prescribes unsigned short.
- */
- (long) semary.sem_nsems);
+ /*
+ * glibc-2.1.3 and earlier has unsigned short;
+ * glibc-2.1.91 has variation between
+ * unsigned short and unsigned long
+ * Austin prescribes unsigned short.
+ */
+ (long) semary.sem_nsems);
break;
}
}
if ((msgctl(0, IPC_INFO, (struct msqid_ds *) (void *) &msginfo)) < 0)
return;
printf("------ Message%s --------\n", "s: Limits");
- printf( "max queues system wide = %d\n"
- "max size of message (bytes) = %d\n"
- "default max size of queue (bytes) = %d\n",
- msginfo.msgmni, msginfo.msgmax, msginfo.msgmnb);
+ printf("max queues system wide = %d\n"
+ "max size of message (bytes) = %d\n"
+ "default max size of queue (bytes) = %d\n",
+ msginfo.msgmni, msginfo.msgmax, msginfo.msgmnb);
return;
case STATUS:
printf("------ Message%s --------\n", "s: Status");
- printf( "allocated queues = %d\n"
- "used headers = %d\n"
- "used space = %d bytes\n",
- msginfo.msgpool, msginfo.msgmap, msginfo.msgtql);
+ printf("allocated queues = %d\n"
+ "used headers = %d\n"
+ "used space = %d bytes\n",
+ msginfo.msgpool, msginfo.msgmap, msginfo.msgtql);
return;
case CREATOR:
printf("------ Message%s --------\n", " Queues: Creators/Owners");
- printf( "%-10s %-10s %-10s %-10s %-10s %-10s\n",
- "msqid", "perms", "cuid", "cgid", "uid", "gid");
+ printf("%-10s %-10s %-10s %-10s %-10s %-10s\n",
+ "msqid", "perms", "cuid", "cgid", "uid", "gid");
break;
case TIME:
printf("------ Message%s --------\n", " Queues Send/Recv/Change Times");
- printf( "%-8s %-10s %-20s %-20s %-20s\n",
- "msqid", "owner", "send", "recv", "change");
+ printf("%-8s %-10s %-20s %-20s %-20s\n",
+ "msqid", "owner", "send", "recv", "change");
break;
case PID:
printf("------ Message%s --------\n", " Queues PIDs");
- printf( "%-10s %-10s %-10s %-10s\n",
- "msqid", "owner", "lspid", "lrpid");
+ printf("%-10s %-10s %-10s %-10s\n",
+ "msqid", "owner", "lspid", "lrpid");
break;
default:
printf("------ Message%s --------\n", " Queues");
- printf( "%-10s %-10s %-10s %-10s %-12s %-12s\n",
- "key", "msqid", "owner", "perms", "used-bytes", "messages");
+ printf("%-10s %-10s %-10s %-10s %-12s %-12s\n",
+ "key", "msqid", "owner", "perms", "used-bytes", "messages");
break;
}
else
printf("%-8d %-10d", msqid, ipcp->uid);
printf(" %-20.16s", msgque.msg_stime
- ? ctime(&msgque.msg_stime) + 4 : "Not set");
+ ? ctime(&msgque.msg_stime) + 4 : "Not set");
printf(" %-20.16s", msgque.msg_rtime
- ? ctime(&msgque.msg_rtime) + 4 : "Not set");
+ ? ctime(&msgque.msg_rtime) + 4 : "Not set");
printf(" %-20.16s\n", msgque.msg_ctime
- ? ctime(&msgque.msg_ctime) + 4 : "Not set");
+ ? ctime(&msgque.msg_ctime) + 4 : "Not set");
break;
case PID:
if (pw)
else
printf("%-10d %-10d", msqid, ipcp->uid);
printf(" %-10o %-12ld %-12ld\n", ipcp->mode & 0777,
- /*
- * glibc-2.1.3 and earlier has unsigned short;
- * glibc-2.1.91 has variation between
- * unsigned short, unsigned long
- * Austin has msgqnum_t
- */
- (long) msgque.msg_cbytes, (long) msgque.msg_qnum);
+ /*
+ * glibc-2.1.3 and earlier has unsigned short;
+ * glibc-2.1.91 has variation between
+ * unsigned short, unsigned long
+ * Austin has msgqnum_t
+ */
+ (long) msgque.msg_cbytes, (long) msgque.msg_qnum);
break;
}
}
}
printf("\nShared memory Segment shmid=%d\n"
- "uid=%d\tgid=%d\tcuid=%d\tcgid=%d\n"
- "mode=%#o\taccess_perms=%#o\n"
- "bytes=%ld\tlpid=%d\tcpid=%d\tnattch=%ld\n",
- shmid,
- ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid,
- ipcp->mode, ipcp->mode & 0777,
- (long) shmds.shm_segsz, shmds.shm_lpid, shmds.shm_cpid,
- (long) shmds.shm_nattch);
+ "uid=%d\tgid=%d\tcuid=%d\tcgid=%d\n"
+ "mode=%#o\taccess_perms=%#o\n"
+ "bytes=%ld\tlpid=%d\tcpid=%d\tnattch=%ld\n",
+ shmid,
+ ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid,
+ ipcp->mode, ipcp->mode & 0777,
+ (long) shmds.shm_segsz, shmds.shm_lpid, shmds.shm_cpid,
+ (long) shmds.shm_nattch);
printf("att_time=%-26.24s\n",
- shmds.shm_atime ? ctime(&shmds.shm_atime) : "Not set");
+ shmds.shm_atime ? ctime(&shmds.shm_atime) : "Not set");
printf("det_time=%-26.24s\n",
- shmds.shm_dtime ? ctime(&shmds.shm_dtime) : "Not set");
+ shmds.shm_dtime ? ctime(&shmds.shm_dtime) : "Not set");
printf("change_time=%-26.24s\n\n", ctime(&shmds.shm_ctime));
}
}
printf("\nMessage Queue msqid=%d\n"
- "uid=%d\tgid=%d\tcuid=%d\tcgid=%d\tmode=%#o\n"
- "cbytes=%ld\tqbytes=%ld\tqnum=%ld\tlspid=%d\tlrpid=%d\n",
- msqid, ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid, ipcp->mode,
- /*
- * glibc-2.1.3 and earlier has unsigned short;
- * glibc-2.1.91 has variation between
- * unsigned short, unsigned long
- * Austin has msgqnum_t (for msg_qbytes)
- */
- (long) buf.msg_cbytes, (long) buf.msg_qbytes,
- (long) buf.msg_qnum, buf.msg_lspid, buf.msg_lrpid);
+ "uid=%d\tgid=%d\tcuid=%d\tcgid=%d\tmode=%#o\n"
+ "cbytes=%ld\tqbytes=%ld\tqnum=%ld\tlspid=%d\tlrpid=%d\n",
+ msqid, ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid, ipcp->mode,
+ /*
+ * glibc-2.1.3 and earlier has unsigned short;
+ * glibc-2.1.91 has variation between
+ * unsigned short, unsigned long
+ * Austin has msgqnum_t (for msg_qbytes)
+ */
+ (long) buf.msg_cbytes, (long) buf.msg_qbytes,
+ (long) buf.msg_qnum, buf.msg_lspid, buf.msg_lrpid);
printf("send_time=%-26.24s\n",
- buf.msg_stime ? ctime(&buf.msg_stime) : "Not set");
+ buf.msg_stime ? ctime(&buf.msg_stime) : "Not set");
printf("rcv_time=%-26.24s\n",
- buf.msg_rtime ? ctime(&buf.msg_rtime) : "Not set");
+ buf.msg_rtime ? ctime(&buf.msg_rtime) : "Not set");
printf("change_time=%-26.24s\n\n",
- buf.msg_ctime ? ctime(&buf.msg_ctime) : "Not set");
+ buf.msg_ctime ? ctime(&buf.msg_ctime) : "Not set");
}
static void print_sem(int semid)
}
printf("\nSemaphore Array semid=%d\n"
- "uid=%d\t gid=%d\t cuid=%d\t cgid=%d\n"
- "mode=%#o, access_perms=%#o\n"
- "nsems = %ld\n"
- "otime = %-26.24s\n",
- semid,
- ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid,
- ipcp->mode, ipcp->mode & 0777,
- (long) semds.sem_nsems,
- semds.sem_otime ? ctime(&semds.sem_otime) : "Not set");
+ "uid=%d\t gid=%d\t cuid=%d\t cgid=%d\n"
+ "mode=%#o, access_perms=%#o\n"
+ "nsems = %ld\n"
+ "otime = %-26.24s\n",
+ semid,
+ ipcp->uid, ipcp->gid, ipcp->cuid, ipcp->cgid,
+ ipcp->mode, ipcp->mode & 0777,
+ (long) semds.sem_nsems,
+ semds.sem_otime ? ctime(&semds.sem_otime) : "Not set");
printf("ctime = %-26.24s\n"
- "%-10s %-10s %-10s %-10s %-10s\n",
- ctime(&semds.sem_ctime),
- "semnum", "value", "ncount", "zcount", "pid");
+ "%-10s %-10s %-10s %-10s %-10s\n",
+ ctime(&semds.sem_ctime),
+ "semnum", "value", "ncount", "zcount", "pid");
arg.val = 0;
for (i = 0; i < semds.sem_nsems; i++) {
if (option_mask32 & OPT_m) {
printf("%s \"Class %04x\" \"%04x\" \"%04x\" \"%04x\" \"%04x\"",
- pci_slot_name, pci_class, pci_vid, pci_did,
- pci_subsys_vid, pci_subsys_did);
+ pci_slot_name, pci_class, pci_vid, pci_did,
+ pci_subsys_vid, pci_subsys_did);
} else {
printf("%s Class %04x: %04x:%04x",
- pci_slot_name, pci_class, pci_vid, pci_did);
+ pci_slot_name, pci_class, pci_vid, pci_did);
}
if ((option_mask32 & OPT_k) && driver) {
static bool_t xdr_fhstatus(XDR *xdrs, fhstatus *objp)
{
if (!xdr_u_int(xdrs, &objp->fhs_status))
- return FALSE;
+ return FALSE;
if (objp->fhs_status == 0)
return xdr_fhandle(xdrs, objp->fhstatus_u.fhs_fhandle);
return TRUE;
static bool_t xdr_fhandle3(XDR *xdrs, fhandle3 *objp)
{
return xdr_bytes(xdrs, (char **)&objp->fhandle3_val,
- (unsigned int *) &objp->fhandle3_len,
- FHSIZE3);
+ (unsigned int *) &objp->fhandle3_len,
+ FHSIZE3);
}
static bool_t xdr_mountres3_ok(XDR *xdrs, mountres3_ok *objp)
if (!xdr_fhandle3(xdrs, &objp->fhandle))
return FALSE;
return xdr_array(xdrs, &(objp->auth_flavours.auth_flavours_val),
- &(objp->auth_flavours.auth_flavours_len),
- ~0,
- sizeof(int),
- (xdrproc_t) xdr_int);
+ &(objp->auth_flavours.auth_flavours_len),
+ ~0,
+ sizeof(int),
+ (xdrproc_t) xdr_int);
}
static bool_t xdr_mountstat3(XDR *xdrs, mountstat3 *objp)
switch (pm_mnt.pm_prot) {
case IPPROTO_UDP:
mclient = clntudp_create(&mount_server_addr,
- pm_mnt.pm_prog,
- pm_mnt.pm_vers,
- retry_timeout,
- &msock);
+ pm_mnt.pm_prog,
+ pm_mnt.pm_vers,
+ retry_timeout,
+ &msock);
if (mclient)
break;
mount_server_addr.sin_port = htons(pm_mnt.pm_port);
msock = RPC_ANYSOCK;
case IPPROTO_TCP:
mclient = clnttcp_create(&mount_server_addr,
- pm_mnt.pm_prog,
- pm_mnt.pm_vers,
- &msock, 0, 0);
+ pm_mnt.pm_prog,
+ pm_mnt.pm_vers,
+ &msock, 0, 0);
break;
default:
mclient = NULL;
if (pm_mnt.pm_vers == 3)
clnt_stat = clnt_call(mclient, MOUNTPROC3_MNT,
- (xdrproc_t) xdr_dirpath,
- (caddr_t) &pathname,
- (xdrproc_t) xdr_mountres3,
- (caddr_t) &status,
- total_timeout);
+ (xdrproc_t) xdr_dirpath,
+ (caddr_t) &pathname,
+ (xdrproc_t) xdr_mountres3,
+ (caddr_t) &status,
+ total_timeout);
else
clnt_stat = clnt_call(mclient, MOUNTPROC_MNT,
- (xdrproc_t) xdr_dirpath,
- (caddr_t) &pathname,
- (xdrproc_t) xdr_fhstatus,
- (caddr_t) &status,
- total_timeout);
+ (xdrproc_t) xdr_dirpath,
+ (caddr_t) &pathname,
+ (xdrproc_t) xdr_fhstatus,
+ (caddr_t) &status,
+ total_timeout);
if (clnt_stat == RPC_SUCCESS)
goto prepare_kernel_data; /* we're done */
while (fgets(mapline, S_LEN, map)) {
if (sscanf(mapline, "%llx %s %s", &fn_add, mode, fn_name) != 3)
bb_error_msg_and_die("%s(%i): wrong map line",
- mapFile, maplineno);
+ mapFile, maplineno);
if (!strcmp(fn_name, "_stext")) /* only elf works like this */ {
add0 = fn_add;
if (indx >= len / sizeof(*buf))
bb_error_msg_and_die("profile address out of range. "
- "Wrong map file?");
+ "Wrong map file?");
while (indx < (next_add-add0)/step) {
if (optBins && (buf[indx] || optAll)) {
) {
if (optVerbose)
printf("%016llx %-40s %6i %8.4f\n", fn_add,
- fn_name, this, this/(double)fn_len);
+ fn_name, this, this/(double)fn_len);
else
printf("%6i %-40s %8.4f\n",
- this, fn_name, this/(double)fn_len);
+ this, fn_name, this/(double)fn_len);
if (optSub) {
unsigned long long scan;
addr = (scan - 1)*step + add0;
printf("\t%#llx\t%s+%#llx\t%u\n",
- addr, fn_name, addr - fn_add,
- buf[scan]);
+ addr, fn_name, addr - fn_add,
+ buf[scan]);
}
}
}
/* trailer */
if (optVerbose)
printf("%016x %-40s %6i %8.4f\n",
- 0, "total", total, total/(double)(fn_add-add0));
+ 0, "total", total, total/(double)(fn_add-add0));
else
printf("%6i %-40s %8.4f\n",
- total, "total", total/(double)(fn_add-add0));
+ total, "total", total/(double)(fn_add-add0));
fclose(map);
free(buf);
volume_id_set_uuid(id, uuid, UUID_DCE);
// snprintf(id->type_version, sizeof(id->type_version)-1, "%u.%u.%u",
-// le32_to_cpu(mdp->major_version),
-// le32_to_cpu(mdp->minor_version),
-// le32_to_cpu(mdp->patch_version));
+// le32_to_cpu(mdp->major_version),
+// le32_to_cpu(mdp->minor_version),
+// le32_to_cpu(mdp->patch_version));
dbg("found raid signature");
// volume_id_set_usage(id, VOLUME_ID_RAID);
void volume_id_set_label_unicode16(struct volume_id *id, const uint8_t *buf, enum endian endianess, size_t count)
{
- volume_id_set_unicode16(id->label, sizeof(id->label), buf, endianess, count);
+ volume_id_set_unicode16(id->label, sizeof(id->label), buf, endianess, count);
}
void volume_id_set_uuid(struct volume_id *id, const uint8_t *buf, enum uuid_format format)