proc_misc.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. /*
  2. * linux/fs/proc/proc_misc.c
  3. *
  4. * linux/fs/proc/array.c
  5. * Copyright (C) 1992 by Linus Torvalds
  6. * based on ideas by Darren Senn
  7. *
  8. * This used to be the part of array.c. See the rest of history and credits
  9. * there. I took this into a separate file and switched the thing to generic
  10. * proc_file_inode_operations, leaving in array.c only per-process stuff.
  11. * Inumbers allocation made dynamic (via create_proc_entry()). AV, May 1999.
  12. *
  13. * Changes:
  14. * Fulton Green : Encapsulated position metric calculations.
  15. * <kernel@FultonGreen.com>
  16. */
  17. #include <linux/types.h>
  18. #include <linux/errno.h>
  19. #include <linux/time.h>
  20. #include <linux/kernel.h>
  21. #include <linux/kernel_stat.h>
  22. #include <linux/tty.h>
  23. #include <linux/string.h>
  24. #include <linux/mman.h>
  25. #include <linux/proc_fs.h>
  26. #include <linux/ioport.h>
  27. #include <linux/config.h>
  28. #include <linux/mm.h>
  29. #include <linux/mmzone.h>
  30. #include <linux/pagemap.h>
  31. #include <linux/swap.h>
  32. #include <linux/slab.h>
  33. #include <linux/smp.h>
  34. #include <linux/signal.h>
  35. #include <linux/module.h>
  36. #include <linux/init.h>
  37. #include <linux/smp_lock.h>
  38. #include <linux/seq_file.h>
  39. #include <linux/times.h>
  40. #include <linux/profile.h>
  41. #include <linux/blkdev.h>
  42. #include <linux/hugetlb.h>
  43. #include <linux/jiffies.h>
  44. #include <linux/sysrq.h>
  45. #include <linux/vmalloc.h>
  46. #include <asm/uaccess.h>
  47. #include <asm/pgtable.h>
  48. #include <asm/io.h>
  49. #include <asm/tlb.h>
  50. #include <asm/div64.h>
  51. #include "internal.h"
  52. #define LOAD_INT(x) ((x) >> FSHIFT)
  53. #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100)
  54. /*
  55. * Warning: stuff below (imported functions) assumes that its output will fit
  56. * into one page. For some of those functions it may be wrong. Moreover, we
  57. * have a way to deal with that gracefully. Right now I used straightforward
  58. * wrappers, but this needs further analysis wrt potential overflows.
  59. */
  60. extern int get_hardware_list(char *);
  61. extern int get_stram_list(char *);
  62. extern int get_chrdev_list(char *);
  63. extern int get_filesystem_list(char *);
  64. extern int get_exec_domain_list(char *);
  65. extern int get_dma_list(char *);
  66. extern int get_locks_status (char *, char **, off_t, int);
  67. static int proc_calc_metrics(char *page, char **start, off_t off,
  68. int count, int *eof, int len)
  69. {
  70. if (len <= off+count) *eof = 1;
  71. *start = page + off;
  72. len -= off;
  73. if (len>count) len = count;
  74. if (len<0) len = 0;
  75. return len;
  76. }
  77. static int loadavg_read_proc(char *page, char **start, off_t off,
  78. int count, int *eof, void *data)
  79. {
  80. int a, b, c;
  81. int len;
  82. a = avenrun[0] + (FIXED_1/200);
  83. b = avenrun[1] + (FIXED_1/200);
  84. c = avenrun[2] + (FIXED_1/200);
  85. len = sprintf(page,"%d.%02d %d.%02d %d.%02d %ld/%d %d\n",
  86. LOAD_INT(a), LOAD_FRAC(a),
  87. LOAD_INT(b), LOAD_FRAC(b),
  88. LOAD_INT(c), LOAD_FRAC(c),
  89. nr_running(), nr_threads, last_pid);
  90. return proc_calc_metrics(page, start, off, count, eof, len);
  91. }
  92. static int uptime_read_proc(char *page, char **start, off_t off,
  93. int count, int *eof, void *data)
  94. {
  95. struct timespec uptime;
  96. struct timespec idle;
  97. int len;
  98. cputime_t idletime = cputime_add(init_task.utime, init_task.stime);
  99. do_posix_clock_monotonic_gettime(&uptime);
  100. cputime_to_timespec(idletime, &idle);
  101. len = sprintf(page,"%lu.%02lu %lu.%02lu\n",
  102. (unsigned long) uptime.tv_sec,
  103. (uptime.tv_nsec / (NSEC_PER_SEC / 100)),
  104. (unsigned long) idle.tv_sec,
  105. (idle.tv_nsec / (NSEC_PER_SEC / 100)));
  106. return proc_calc_metrics(page, start, off, count, eof, len);
  107. }
  108. static int meminfo_read_proc(char *page, char **start, off_t off,
  109. int count, int *eof, void *data)
  110. {
  111. struct sysinfo i;
  112. int len;
  113. struct page_state ps;
  114. unsigned long inactive;
  115. unsigned long active;
  116. unsigned long free;
  117. unsigned long committed;
  118. unsigned long allowed;
  119. struct vmalloc_info vmi;
  120. long cached;
  121. get_page_state(&ps);
  122. get_zone_counts(&active, &inactive, &free);
  123. /*
  124. * display in kilobytes.
  125. */
  126. #define K(x) ((x) << (PAGE_SHIFT - 10))
  127. si_meminfo(&i);
  128. si_swapinfo(&i);
  129. committed = atomic_read(&vm_committed_space);
  130. allowed = ((totalram_pages - hugetlb_total_pages())
  131. * sysctl_overcommit_ratio / 100) + total_swap_pages;
  132. cached = get_page_cache_size() - total_swapcache_pages - i.bufferram;
  133. if (cached < 0)
  134. cached = 0;
  135. get_vmalloc_info(&vmi);
  136. /*
  137. * Tagged format, for easy grepping and expansion.
  138. */
  139. len = sprintf(page,
  140. "MemTotal: %8lu kB\n"
  141. "MemFree: %8lu kB\n"
  142. "Buffers: %8lu kB\n"
  143. "Cached: %8lu kB\n"
  144. "SwapCached: %8lu kB\n"
  145. "Active: %8lu kB\n"
  146. "Inactive: %8lu kB\n"
  147. "HighTotal: %8lu kB\n"
  148. "HighFree: %8lu kB\n"
  149. "LowTotal: %8lu kB\n"
  150. "LowFree: %8lu kB\n"
  151. "SwapTotal: %8lu kB\n"
  152. "SwapFree: %8lu kB\n"
  153. "Dirty: %8lu kB\n"
  154. "Writeback: %8lu kB\n"
  155. "Mapped: %8lu kB\n"
  156. "Slab: %8lu kB\n"
  157. "CommitLimit: %8lu kB\n"
  158. "Committed_AS: %8lu kB\n"
  159. "PageTables: %8lu kB\n"
  160. "VmallocTotal: %8lu kB\n"
  161. "VmallocUsed: %8lu kB\n"
  162. "VmallocChunk: %8lu kB\n",
  163. K(i.totalram),
  164. K(i.freeram),
  165. K(i.bufferram),
  166. K(cached),
  167. K(total_swapcache_pages),
  168. K(active),
  169. K(inactive),
  170. K(i.totalhigh),
  171. K(i.freehigh),
  172. K(i.totalram-i.totalhigh),
  173. K(i.freeram-i.freehigh),
  174. K(i.totalswap),
  175. K(i.freeswap),
  176. K(ps.nr_dirty),
  177. K(ps.nr_writeback),
  178. K(ps.nr_mapped),
  179. K(ps.nr_slab),
  180. K(allowed),
  181. K(committed),
  182. K(ps.nr_page_table_pages),
  183. (unsigned long)VMALLOC_TOTAL >> 10,
  184. vmi.used >> 10,
  185. vmi.largest_chunk >> 10
  186. );
  187. len += hugetlb_report_meminfo(page + len);
  188. return proc_calc_metrics(page, start, off, count, eof, len);
  189. #undef K
  190. }
  191. extern struct seq_operations fragmentation_op;
  192. static int fragmentation_open(struct inode *inode, struct file *file)
  193. {
  194. (void)inode;
  195. return seq_open(file, &fragmentation_op);
  196. }
  197. static struct file_operations fragmentation_file_operations = {
  198. .open = fragmentation_open,
  199. .read = seq_read,
  200. .llseek = seq_lseek,
  201. .release = seq_release,
  202. };
  203. static int version_read_proc(char *page, char **start, off_t off,
  204. int count, int *eof, void *data)
  205. {
  206. int len;
  207. strcpy(page, linux_banner);
  208. len = strlen(page);
  209. return proc_calc_metrics(page, start, off, count, eof, len);
  210. }
  211. extern struct seq_operations cpuinfo_op;
  212. static int cpuinfo_open(struct inode *inode, struct file *file)
  213. {
  214. return seq_open(file, &cpuinfo_op);
  215. }
  216. static struct file_operations proc_cpuinfo_operations = {
  217. .open = cpuinfo_open,
  218. .read = seq_read,
  219. .llseek = seq_lseek,
  220. .release = seq_release,
  221. };
  222. extern struct seq_operations vmstat_op;
  223. static int vmstat_open(struct inode *inode, struct file *file)
  224. {
  225. return seq_open(file, &vmstat_op);
  226. }
  227. static struct file_operations proc_vmstat_file_operations = {
  228. .open = vmstat_open,
  229. .read = seq_read,
  230. .llseek = seq_lseek,
  231. .release = seq_release,
  232. };
  233. #ifdef CONFIG_PROC_HARDWARE
  234. static int hardware_read_proc(char *page, char **start, off_t off,
  235. int count, int *eof, void *data)
  236. {
  237. int len = get_hardware_list(page);
  238. return proc_calc_metrics(page, start, off, count, eof, len);
  239. }
  240. #endif
  241. #ifdef CONFIG_STRAM_PROC
  242. static int stram_read_proc(char *page, char **start, off_t off,
  243. int count, int *eof, void *data)
  244. {
  245. int len = get_stram_list(page);
  246. return proc_calc_metrics(page, start, off, count, eof, len);
  247. }
  248. #endif
  249. extern struct seq_operations partitions_op;
  250. static int partitions_open(struct inode *inode, struct file *file)
  251. {
  252. return seq_open(file, &partitions_op);
  253. }
  254. static struct file_operations proc_partitions_operations = {
  255. .open = partitions_open,
  256. .read = seq_read,
  257. .llseek = seq_lseek,
  258. .release = seq_release,
  259. };
  260. extern struct seq_operations diskstats_op;
  261. static int diskstats_open(struct inode *inode, struct file *file)
  262. {
  263. return seq_open(file, &diskstats_op);
  264. }
  265. static struct file_operations proc_diskstats_operations = {
  266. .open = diskstats_open,
  267. .read = seq_read,
  268. .llseek = seq_lseek,
  269. .release = seq_release,
  270. };
  271. #ifdef CONFIG_MODULES
  272. extern struct seq_operations modules_op;
  273. static int modules_open(struct inode *inode, struct file *file)
  274. {
  275. return seq_open(file, &modules_op);
  276. }
  277. static struct file_operations proc_modules_operations = {
  278. .open = modules_open,
  279. .read = seq_read,
  280. .llseek = seq_lseek,
  281. .release = seq_release,
  282. };
  283. #endif
  284. extern struct seq_operations slabinfo_op;
  285. extern ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *);
  286. static int slabinfo_open(struct inode *inode, struct file *file)
  287. {
  288. return seq_open(file, &slabinfo_op);
  289. }
  290. static struct file_operations proc_slabinfo_operations = {
  291. .open = slabinfo_open,
  292. .read = seq_read,
  293. .write = slabinfo_write,
  294. .llseek = seq_lseek,
  295. .release = seq_release,
  296. };
  297. static int show_stat(struct seq_file *p, void *v)
  298. {
  299. int i;
  300. unsigned long jif;
  301. cputime64_t user, nice, system, idle, iowait, irq, softirq, steal;
  302. u64 sum = 0;
  303. user = nice = system = idle = iowait =
  304. irq = softirq = steal = cputime64_zero;
  305. jif = - wall_to_monotonic.tv_sec;
  306. if (wall_to_monotonic.tv_nsec)
  307. --jif;
  308. for_each_cpu(i) {
  309. int j;
  310. user = cputime64_add(user, kstat_cpu(i).cpustat.user);
  311. nice = cputime64_add(nice, kstat_cpu(i).cpustat.nice);
  312. system = cputime64_add(system, kstat_cpu(i).cpustat.system);
  313. idle = cputime64_add(idle, kstat_cpu(i).cpustat.idle);
  314. iowait = cputime64_add(iowait, kstat_cpu(i).cpustat.iowait);
  315. irq = cputime64_add(irq, kstat_cpu(i).cpustat.irq);
  316. softirq = cputime64_add(softirq, kstat_cpu(i).cpustat.softirq);
  317. steal = cputime64_add(steal, kstat_cpu(i).cpustat.steal);
  318. for (j = 0 ; j < NR_IRQS ; j++)
  319. sum += kstat_cpu(i).irqs[j];
  320. }
  321. seq_printf(p, "cpu %llu %llu %llu %llu %llu %llu %llu %llu\n",
  322. (unsigned long long)cputime64_to_clock_t(user),
  323. (unsigned long long)cputime64_to_clock_t(nice),
  324. (unsigned long long)cputime64_to_clock_t(system),
  325. (unsigned long long)cputime64_to_clock_t(idle),
  326. (unsigned long long)cputime64_to_clock_t(iowait),
  327. (unsigned long long)cputime64_to_clock_t(irq),
  328. (unsigned long long)cputime64_to_clock_t(softirq),
  329. (unsigned long long)cputime64_to_clock_t(steal));
  330. for_each_online_cpu(i) {
  331. /* Copy values here to work around gcc-2.95.3, gcc-2.96 */
  332. user = kstat_cpu(i).cpustat.user;
  333. nice = kstat_cpu(i).cpustat.nice;
  334. system = kstat_cpu(i).cpustat.system;
  335. idle = kstat_cpu(i).cpustat.idle;
  336. iowait = kstat_cpu(i).cpustat.iowait;
  337. irq = kstat_cpu(i).cpustat.irq;
  338. softirq = kstat_cpu(i).cpustat.softirq;
  339. steal = kstat_cpu(i).cpustat.steal;
  340. seq_printf(p, "cpu%d %llu %llu %llu %llu %llu %llu %llu %llu\n",
  341. i,
  342. (unsigned long long)cputime64_to_clock_t(user),
  343. (unsigned long long)cputime64_to_clock_t(nice),
  344. (unsigned long long)cputime64_to_clock_t(system),
  345. (unsigned long long)cputime64_to_clock_t(idle),
  346. (unsigned long long)cputime64_to_clock_t(iowait),
  347. (unsigned long long)cputime64_to_clock_t(irq),
  348. (unsigned long long)cputime64_to_clock_t(softirq),
  349. (unsigned long long)cputime64_to_clock_t(steal));
  350. }
  351. seq_printf(p, "intr %llu", (unsigned long long)sum);
  352. #if !defined(CONFIG_PPC64) && !defined(CONFIG_ALPHA)
  353. for (i = 0; i < NR_IRQS; i++)
  354. seq_printf(p, " %u", kstat_irqs(i));
  355. #endif
  356. seq_printf(p,
  357. "\nctxt %llu\n"
  358. "btime %lu\n"
  359. "processes %lu\n"
  360. "procs_running %lu\n"
  361. "procs_blocked %lu\n",
  362. nr_context_switches(),
  363. (unsigned long)jif,
  364. total_forks,
  365. nr_running(),
  366. nr_iowait());
  367. return 0;
  368. }
  369. static int stat_open(struct inode *inode, struct file *file)
  370. {
  371. unsigned size = 4096 * (1 + num_possible_cpus() / 32);
  372. char *buf;
  373. struct seq_file *m;
  374. int res;
  375. /* don't ask for more than the kmalloc() max size, currently 128 KB */
  376. if (size > 128 * 1024)
  377. size = 128 * 1024;
  378. buf = kmalloc(size, GFP_KERNEL);
  379. if (!buf)
  380. return -ENOMEM;
  381. res = single_open(file, show_stat, NULL);
  382. if (!res) {
  383. m = file->private_data;
  384. m->buf = buf;
  385. m->size = size;
  386. } else
  387. kfree(buf);
  388. return res;
  389. }
  390. static struct file_operations proc_stat_operations = {
  391. .open = stat_open,
  392. .read = seq_read,
  393. .llseek = seq_lseek,
  394. .release = single_release,
  395. };
  396. static int devices_read_proc(char *page, char **start, off_t off,
  397. int count, int *eof, void *data)
  398. {
  399. int len = get_chrdev_list(page);
  400. len += get_blkdev_list(page+len);
  401. return proc_calc_metrics(page, start, off, count, eof, len);
  402. }
  403. /*
  404. * /proc/interrupts
  405. */
  406. static void *int_seq_start(struct seq_file *f, loff_t *pos)
  407. {
  408. return (*pos <= NR_IRQS) ? pos : NULL;
  409. }
  410. static void *int_seq_next(struct seq_file *f, void *v, loff_t *pos)
  411. {
  412. (*pos)++;
  413. if (*pos > NR_IRQS)
  414. return NULL;
  415. return pos;
  416. }
  417. static void int_seq_stop(struct seq_file *f, void *v)
  418. {
  419. /* Nothing to do */
  420. }
  421. extern int show_interrupts(struct seq_file *f, void *v); /* In arch code */
  422. static struct seq_operations int_seq_ops = {
  423. .start = int_seq_start,
  424. .next = int_seq_next,
  425. .stop = int_seq_stop,
  426. .show = show_interrupts
  427. };
  428. static int interrupts_open(struct inode *inode, struct file *filp)
  429. {
  430. return seq_open(filp, &int_seq_ops);
  431. }
  432. static struct file_operations proc_interrupts_operations = {
  433. .open = interrupts_open,
  434. .read = seq_read,
  435. .llseek = seq_lseek,
  436. .release = seq_release,
  437. };
  438. static int filesystems_read_proc(char *page, char **start, off_t off,
  439. int count, int *eof, void *data)
  440. {
  441. int len = get_filesystem_list(page);
  442. return proc_calc_metrics(page, start, off, count, eof, len);
  443. }
  444. static int cmdline_read_proc(char *page, char **start, off_t off,
  445. int count, int *eof, void *data)
  446. {
  447. int len;
  448. len = sprintf(page, "%s\n", saved_command_line);
  449. return proc_calc_metrics(page, start, off, count, eof, len);
  450. }
  451. static int locks_read_proc(char *page, char **start, off_t off,
  452. int count, int *eof, void *data)
  453. {
  454. int len = get_locks_status(page, start, off, count);
  455. if (len < count)
  456. *eof = 1;
  457. return len;
  458. }
  459. static int execdomains_read_proc(char *page, char **start, off_t off,
  460. int count, int *eof, void *data)
  461. {
  462. int len = get_exec_domain_list(page);
  463. return proc_calc_metrics(page, start, off, count, eof, len);
  464. }
  465. #ifdef CONFIG_MAGIC_SYSRQ
  466. /*
  467. * writing 'C' to /proc/sysrq-trigger is like sysrq-C
  468. */
  469. static ssize_t write_sysrq_trigger(struct file *file, const char __user *buf,
  470. size_t count, loff_t *ppos)
  471. {
  472. if (count) {
  473. char c;
  474. if (get_user(c, buf))
  475. return -EFAULT;
  476. __handle_sysrq(c, NULL, NULL, 0);
  477. }
  478. return count;
  479. }
  480. static struct file_operations proc_sysrq_trigger_operations = {
  481. .write = write_sysrq_trigger,
  482. };
  483. #endif
  484. struct proc_dir_entry *proc_root_kcore;
  485. void create_seq_entry(char *name, mode_t mode, struct file_operations *f)
  486. {
  487. struct proc_dir_entry *entry;
  488. entry = create_proc_entry(name, mode, NULL);
  489. if (entry)
  490. entry->proc_fops = f;
  491. }
  492. void __init proc_misc_init(void)
  493. {
  494. struct proc_dir_entry *entry;
  495. static struct {
  496. char *name;
  497. int (*read_proc)(char*,char**,off_t,int,int*,void*);
  498. } *p, simple_ones[] = {
  499. {"loadavg", loadavg_read_proc},
  500. {"uptime", uptime_read_proc},
  501. {"meminfo", meminfo_read_proc},
  502. {"version", version_read_proc},
  503. #ifdef CONFIG_PROC_HARDWARE
  504. {"hardware", hardware_read_proc},
  505. #endif
  506. #ifdef CONFIG_STRAM_PROC
  507. {"stram", stram_read_proc},
  508. #endif
  509. {"devices", devices_read_proc},
  510. {"filesystems", filesystems_read_proc},
  511. {"cmdline", cmdline_read_proc},
  512. {"locks", locks_read_proc},
  513. {"execdomains", execdomains_read_proc},
  514. {NULL,}
  515. };
  516. for (p = simple_ones; p->name; p++)
  517. create_proc_read_entry(p->name, 0, NULL, p->read_proc, NULL);
  518. proc_symlink("mounts", NULL, "self/mounts");
  519. /* And now for trickier ones */
  520. entry = create_proc_entry("kmsg", S_IRUSR, &proc_root);
  521. if (entry)
  522. entry->proc_fops = &proc_kmsg_operations;
  523. create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations);
  524. create_seq_entry("partitions", 0, &proc_partitions_operations);
  525. create_seq_entry("stat", 0, &proc_stat_operations);
  526. create_seq_entry("interrupts", 0, &proc_interrupts_operations);
  527. create_seq_entry("slabinfo",S_IWUSR|S_IRUGO,&proc_slabinfo_operations);
  528. create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations);
  529. create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations);
  530. create_seq_entry("diskstats", 0, &proc_diskstats_operations);
  531. #ifdef CONFIG_MODULES
  532. create_seq_entry("modules", 0, &proc_modules_operations);
  533. #endif
  534. #ifdef CONFIG_SCHEDSTATS
  535. create_seq_entry("schedstat", 0, &proc_schedstat_operations);
  536. #endif
  537. #ifdef CONFIG_PROC_KCORE
  538. proc_root_kcore = create_proc_entry("kcore", S_IRUSR, NULL);
  539. if (proc_root_kcore) {
  540. proc_root_kcore->proc_fops = &proc_kcore_operations;
  541. proc_root_kcore->size =
  542. (size_t)high_memory - PAGE_OFFSET + PAGE_SIZE;
  543. }
  544. #endif
  545. #ifdef CONFIG_MAGIC_SYSRQ
  546. entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL);
  547. if (entry)
  548. entry->proc_fops = &proc_sysrq_trigger_operations;
  549. #endif
  550. #ifdef CONFIG_PPC32
  551. {
  552. extern struct file_operations ppc_htab_operations;
  553. entry = create_proc_entry("ppc_htab", S_IRUGO|S_IWUSR, NULL);
  554. if (entry)
  555. entry->proc_fops = &ppc_htab_operations;
  556. }
  557. #endif
  558. }