df(1): Fix amd64 warnings (type widths).
[dragonfly.git] / bin / df / df.c
CommitLineData
984263bc
MD
1/*
2 * Copyright (c) 1980, 1990, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the University of
21 * California, Berkeley and its contributors.
22 * 4. Neither the name of the University nor the names of its contributors
23 * may be used to endorse or promote products derived from this software
24 * without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
1de703da
MD
37 *
38 * @(#) Copyright (c) 1980, 1990, 1993, 1994 The Regents of the University of California. All rights reserved.
39 * @(#)df.c 8.9 (Berkeley) 5/8/95
40 * $FreeBSD: src/bin/df/df.c,v 1.23.2.9 2002/07/01 00:14:24 iedowse Exp $
4b378413 41 * $DragonFly: src/bin/df/df.c,v 1.13 2008/08/07 09:59:49 swildner Exp $
984263bc
MD
42 */
43
984263bc
MD
44#include <sys/cdefs.h>
45#include <sys/param.h>
46#include <sys/stat.h>
47#include <sys/mount.h>
48#include <sys/sysctl.h>
799e4f0b 49#include <sys/statvfs.h>
67ad9090
MD
50
51#include <vfs/ufs/dinode.h>
38a690d7 52#include <vfs/ufs/fs.h>
67ad9090 53#include <vfs/ufs/ufsmount.h>
984263bc
MD
54
55#include <err.h>
56#include <errno.h>
57#include <fcntl.h>
58#include <fstab.h>
da3084db 59#include <libutil.h>
984263bc
MD
60#include <stdio.h>
61#include <stdlib.h>
62#include <string.h>
63#include <sysexits.h>
64#include <unistd.h>
65
66#define UNITS_SI 1
67#define UNITS_2 2
68
984263bc
MD
69/* Maximum widths of various fields. */
70struct maxwidths {
71 int mntfrom;
72 int total;
73 int used;
74 int avail;
75 int iused;
76 int ifree;
77};
78
984263bc
MD
79int bread(off_t, void *, int);
80int checkvfsname(const char *, char **);
81char *getmntpt(char *);
799e4f0b 82int quadwidth(int64_t);
984263bc
MD
83char *makenetvfslist(void);
84char **makevfslist(char *);
4b378413 85void prthuman(struct statvfs *, int64_t);
da3084db 86void prthumanval(int64_t);
799e4f0b
MD
87void prtstat(struct statfs *, struct statvfs *, struct maxwidths *);
88long regetmntinfo(struct statfs **, struct statvfs **, long, char **);
984263bc 89int ufs_df(char *, struct maxwidths *);
799e4f0b 90void update_maxwidths(struct maxwidths *, struct statfs *, struct statvfs *);
984263bc
MD
91void usage(void);
92
93int aflag = 0, hflag, iflag, nflag;
94struct ufs_args mdev;
95
1f0f7b35
SW
96static __inline int
97imax(int a, int b)
984263bc
MD
98{
99 return (a > b ? a : b);
100}
101
799e4f0b
MD
102static __inline int64_t
103qmax(int64_t a, int64_t b)
104{
105 return (a > b ? a : b);
106}
107
984263bc 108int
b5744197 109main(int argc, char **argv)
984263bc
MD
110{
111 struct stat stbuf;
112 struct statfs statfsbuf, *mntbuf;
799e4f0b 113 struct statvfs statvfsbuf, *mntvbuf;
984263bc
MD
114 struct maxwidths maxwidths;
115 const char *fstype;
116 char *mntpath, *mntpt, **vfslist;
117 long mntsize;
118 int ch, i, rv;
119
120 fstype = "ufs";
121
122 vfslist = NULL;
123 while ((ch = getopt(argc, argv, "abgHhiklmnPt:")) != -1)
124 switch (ch) {
125 case 'a':
126 aflag = 1;
127 break;
128 case 'b':
129 /* FALLTHROUGH */
130 case 'P':
6fb88001
SS
131 if (putenv("BLOCKSIZE=512") != 0)
132 warn("putenv: cannot set BLOCKSIZE=512");
984263bc
MD
133 hflag = 0;
134 break;
135 case 'g':
6fb88001
SS
136 if (putenv("BLOCKSIZE=1g") != 0)
137 warn("putenv: cannot set BLOCKSIZE=1g");
984263bc
MD
138 hflag = 0;
139 break;
140 case 'H':
141 hflag = UNITS_SI;
984263bc
MD
142 break;
143 case 'h':
144 hflag = UNITS_2;
984263bc
MD
145 break;
146 case 'i':
147 iflag = 1;
148 break;
149 case 'k':
6fb88001
SS
150 if (putenv("BLOCKSIZE=1k") != 0)
151 warn("putenv: cannot set BLOCKSIZE=1k");
984263bc
MD
152 hflag = 0;
153 break;
154 case 'l':
155 if (vfslist != NULL)
156 errx(1, "-l and -t are mutually exclusive.");
157 vfslist = makevfslist(makenetvfslist());
158 break;
159 case 'm':
6fb88001
SS
160 if (putenv("BLOCKSIZE=1m") != 0)
161 warn("putenv: cannot set BLOCKSIZE=1m");
984263bc
MD
162 hflag = 0;
163 break;
164 case 'n':
165 nflag = 1;
166 break;
167 case 't':
168 if (vfslist != NULL)
169 errx(1, "only one -t option may be specified");
170 fstype = optarg;
171 vfslist = makevfslist(optarg);
172 break;
173 case '?':
174 default:
175 usage();
176 }
177 argc -= optind;
178 argv += optind;
179
799e4f0b 180 mntsize = getmntvinfo(&mntbuf, &mntvbuf, MNT_NOWAIT);
984263bc
MD
181 bzero(&maxwidths, sizeof(maxwidths));
182 for (i = 0; i < mntsize; i++)
799e4f0b 183 update_maxwidths(&maxwidths, &mntbuf[i], &mntvbuf[i]);
984263bc
MD
184
185 rv = 0;
186 if (!*argv) {
799e4f0b 187 mntsize = regetmntinfo(&mntbuf, &mntvbuf, mntsize, vfslist);
984263bc
MD
188 bzero(&maxwidths, sizeof(maxwidths));
189 for (i = 0; i < mntsize; i++)
799e4f0b 190 update_maxwidths(&maxwidths, &mntbuf[i], &mntvbuf[i]);
984263bc
MD
191 for (i = 0; i < mntsize; i++) {
192 if (aflag || (mntbuf[i].f_flags & MNT_IGNORE) == 0)
799e4f0b 193 prtstat(&mntbuf[i], &mntvbuf[i], &maxwidths);
984263bc
MD
194 }
195 exit(rv);
196 }
197
198 for (; *argv; argv++) {
199 if (stat(*argv, &stbuf) < 0) {
200 if ((mntpt = getmntpt(*argv)) == 0) {
201 warn("%s", *argv);
202 rv = 1;
203 continue;
204 }
205 } else if (S_ISCHR(stbuf.st_mode)) {
206 if ((mntpt = getmntpt(*argv)) == 0) {
207 mdev.fspec = *argv;
208 mntpath = strdup("/tmp/df.XXXXXX");
209 if (mntpath == NULL) {
210 warn("strdup failed");
211 rv = 1;
212 continue;
213 }
214 mntpt = mkdtemp(mntpath);
215 if (mntpt == NULL) {
216 warn("mkdtemp(\"%s\") failed", mntpath);
217 rv = 1;
218 free(mntpath);
219 continue;
220 }
221 if (mount(fstype, mntpt, MNT_RDONLY,
222 &mdev) != 0) {
223 rv = ufs_df(*argv, &maxwidths) || rv;
57fed2af 224 rmdir(mntpt);
984263bc
MD
225 free(mntpath);
226 continue;
799e4f0b
MD
227 } else if (statfs(mntpt, &statfsbuf) == 0 &&
228 statvfs(mntpt, &statvfsbuf) == 0) {
984263bc 229 statfsbuf.f_mntonname[0] = '\0';
799e4f0b 230 prtstat(&statfsbuf, &statvfsbuf, &maxwidths);
984263bc
MD
231 } else {
232 warn("%s", *argv);
233 rv = 1;
234 }
57fed2af
EN
235 unmount(mntpt, 0);
236 rmdir(mntpt);
984263bc
MD
237 free(mntpath);
238 continue;
239 }
240 } else
241 mntpt = *argv;
242 /*
243 * Statfs does not take a `wait' flag, so we cannot
244 * implement nflag here.
245 */
246 if (statfs(mntpt, &statfsbuf) < 0) {
247 warn("%s", mntpt);
248 rv = 1;
249 continue;
250 }
799e4f0b
MD
251 if (statvfs(mntpt, &statvfsbuf) < 0) {
252 warn("%s", mntpt);
253 rv = 1;
254 continue;
255 }
984263bc
MD
256 if (argc == 1) {
257 bzero(&maxwidths, sizeof(maxwidths));
799e4f0b 258 update_maxwidths(&maxwidths, &statfsbuf, &statvfsbuf);
984263bc 259 }
799e4f0b 260 prtstat(&statfsbuf, &statvfsbuf, &maxwidths);
984263bc
MD
261 }
262 return (rv);
263}
264
265char *
266getmntpt(char *name)
267{
268 long mntsize, i;
269 struct statfs *mntbuf;
799e4f0b 270 struct statvfs *mntvbuf;
984263bc 271
799e4f0b 272 mntsize = getmntvinfo(&mntbuf, &mntvbuf, MNT_NOWAIT);
984263bc
MD
273 for (i = 0; i < mntsize; i++) {
274 if (!strcmp(mntbuf[i].f_mntfromname, name))
275 return (mntbuf[i].f_mntonname);
276 }
277 return (0);
278}
279
280/*
281 * Make a pass over the filesystem info in ``mntbuf'' filtering out
282 * filesystem types not in vfslist and possibly re-stating to get
283 * current (not cached) info. Returns the new count of valid statfs bufs.
284 */
285long
799e4f0b 286regetmntinfo(struct statfs **mntbufp, struct statvfs **mntvbufp, long mntsize, char **vfslist)
984263bc
MD
287{
288 int i, j;
289 struct statfs *mntbuf;
799e4f0b 290 struct statvfs *mntvbuf;
984263bc
MD
291
292 if (vfslist == NULL)
799e4f0b 293 return (nflag ? mntsize : getmntvinfo(mntbufp, mntvbufp, MNT_WAIT));
984263bc
MD
294
295 mntbuf = *mntbufp;
799e4f0b 296 mntvbuf = *mntvbufp;
984263bc
MD
297 for (j = 0, i = 0; i < mntsize; i++) {
298 if (checkvfsname(mntbuf[i].f_fstypename, vfslist))
299 continue;
799e4f0b 300 if (!nflag) {
57fed2af 301 statfs(mntbuf[i].f_mntonname,&mntbuf[j]);
799e4f0b
MD
302 statvfs(mntbuf[i].f_mntonname,&mntvbuf[j]);
303 } else if (i != j) {
984263bc 304 mntbuf[j] = mntbuf[i];
799e4f0b
MD
305 mntvbuf[j] = mntvbuf[i];
306 }
984263bc
MD
307 j++;
308 }
309 return (j);
310}
311
984263bc 312void
4b378413 313prthuman(struct statvfs *vsfsp, int64_t used)
984263bc 314{
da3084db
SW
315 prthumanval(vsfsp->f_blocks * vsfsp->f_bsize);
316 prthumanval(used * vsfsp->f_bsize);
317 prthumanval(vsfsp->f_bavail * vsfsp->f_bsize);
984263bc
MD
318}
319
320void
da3084db 321prthumanval(int64_t bytes)
984263bc 322{
da3084db
SW
323 char buf[6];
324 int flags;
325
326 flags = HN_B | HN_NOSPACE | HN_DECIMAL;
327 if (hflag == UNITS_SI)
328 flags |= HN_DIVISOR_1000;
984263bc 329
da3084db
SW
330 humanize_number(buf, sizeof(buf) - (bytes < 0 ? 0 : 1),
331 bytes, "", HN_AUTOSCALE, flags);
984263bc 332
da3084db 333 printf(" %6s", buf);
984263bc
MD
334}
335
336/*
337 * Convert statfs returned filesystem size into BLOCKSIZE units.
338 * Attempts to avoid overflow for large filesystems.
339 */
91a6f290
SW
340static intmax_t
341fsbtoblk(int64_t num, uint64_t bsize, u_long reqbsize)
799e4f0b 342{
91a6f290
SW
343 if (bsize != 0 && bsize < reqbsize)
344 return (num / (intmax_t)(reqbsize / bsize));
799e4f0b 345 else
91a6f290 346 return (num * (intmax_t)(bsize / reqbsize));
799e4f0b 347}
984263bc
MD
348
349/*
350 * Print out status about a filesystem.
351 */
352void
799e4f0b 353prtstat(struct statfs *sfsp, struct statvfs *vsfsp, struct maxwidths *mwp)
984263bc
MD
354{
355 static long blocksize;
356 static int headerlen, timesthrough;
357 static const char *header;
799e4f0b 358 int64_t used, availblks, inodes;
984263bc
MD
359
360 if (++timesthrough == 1) {
361 mwp->mntfrom = imax(mwp->mntfrom, strlen("Filesystem"));
362 if (hflag) {
363 header = " Size";
364 mwp->total = mwp->used = mwp->avail = strlen(header);
365 } else {
366 header = getbsize(&headerlen, &blocksize);
367 mwp->total = imax(mwp->total, headerlen);
368 }
369 mwp->used = imax(mwp->used, strlen("Used"));
370 mwp->avail = imax(mwp->avail, strlen("Avail"));
371
57fed2af 372 printf("%-*s %-*s %*s %*s Capacity", mwp->mntfrom,
984263bc
MD
373 "Filesystem", mwp->total, header, mwp->used, "Used",
374 mwp->avail, "Avail");
375 if (iflag) {
376 mwp->iused = imax(mwp->iused, strlen(" iused"));
377 mwp->ifree = imax(mwp->ifree, strlen("ifree"));
57fed2af 378 printf(" %*s %*s %%iused", mwp->iused - 2,
984263bc
MD
379 "iused", mwp->ifree, "ifree");
380 }
57fed2af 381 printf(" Mounted on\n");
984263bc 382 }
57fed2af 383 printf("%-*s", mwp->mntfrom, sfsp->f_mntfromname);
799e4f0b
MD
384 used = vsfsp->f_blocks - vsfsp->f_bfree;
385 availblks = vsfsp->f_bavail + used;
984263bc 386 if (hflag) {
799e4f0b 387 prthuman(vsfsp, used);
984263bc 388 } else {
91a6f290 389 printf(" %*jd %*jd %*jd", mwp->total,
799e4f0b
MD
390 fsbtoblk(vsfsp->f_blocks, vsfsp->f_bsize, blocksize),
391 mwp->used, fsbtoblk(used, vsfsp->f_bsize, blocksize),
392 mwp->avail, fsbtoblk(vsfsp->f_bavail, vsfsp->f_bsize,
984263bc
MD
393 blocksize));
394 }
57fed2af 395 printf(" %5.0f%%",
984263bc
MD
396 availblks == 0 ? 100.0 : (double)used / (double)availblks * 100.0);
397 if (iflag) {
799e4f0b
MD
398 inodes = vsfsp->f_files;
399 used = inodes - vsfsp->f_ffree;
91a6f290
SW
400 printf(" %*jd %*jd %4.0f%% ", mwp->iused, (intmax_t)used,
401 mwp->ifree, (intmax_t)vsfsp->f_ffree, inodes == 0 ? 100.0 :
984263bc
MD
402 (double)used / (double)inodes * 100.0);
403 } else
57fed2af
EN
404 printf(" ");
405 printf(" %s\n", sfsp->f_mntonname);
984263bc
MD
406}
407
408/*
409 * Update the maximum field-width information in `mwp' based on
410 * the filesystem specified by `sfsp'.
411 */
412void
799e4f0b 413update_maxwidths(struct maxwidths *mwp, struct statfs *sfsp, struct statvfs *vsfsp)
984263bc
MD
414{
415 static long blocksize;
416 int dummy;
417
418 if (blocksize == 0)
419 getbsize(&dummy, &blocksize);
420
421 mwp->mntfrom = imax(mwp->mntfrom, strlen(sfsp->f_mntfromname));
799e4f0b
MD
422 mwp->total = imax(mwp->total, quadwidth(fsbtoblk(vsfsp->f_blocks,
423 vsfsp->f_bsize, blocksize)));
424 mwp->used = imax(mwp->used, quadwidth(fsbtoblk(vsfsp->f_blocks -
425 vsfsp->f_bfree, vsfsp->f_bsize, blocksize)));
426 mwp->avail = imax(mwp->avail, quadwidth(fsbtoblk(vsfsp->f_bavail,
427 vsfsp->f_bsize, blocksize)));
428 mwp->iused = imax(mwp->iused, quadwidth(vsfsp->f_files -
429 vsfsp->f_ffree));
430 mwp->ifree = imax(mwp->ifree, quadwidth(vsfsp->f_ffree));
984263bc
MD
431}
432
433/* Return the width in characters of the specified long. */
434int
799e4f0b 435quadwidth(int64_t val)
984263bc
MD
436{
437 int len;
438
439 len = 0;
440 /* Negative or zero values require one extra digit. */
441 if (val <= 0) {
442 val = -val;
443 len++;
444 }
445 while (val > 0) {
446 len++;
447 val /= 10;
448 }
984263bc
MD
449 return (len);
450}
451
452/*
453 * This code constitutes the pre-system call Berkeley df code for extracting
454 * information from filesystem superblocks.
455 */
456
457union {
458 struct fs iu_fs;
459 char dummy[SBSIZE];
460} sb;
461#define sblock sb.iu_fs
462
463int rfd;
464
465int
466ufs_df(char *file, struct maxwidths *mwp)
467{
468 struct statfs statfsbuf;
799e4f0b 469 struct statvfs statvfsbuf;
984263bc 470 struct statfs *sfsp;
799e4f0b 471 struct statvfs *vsfsp;
984263bc
MD
472 const char *mntpt;
473 static int synced;
474
475 if (synced++ == 0)
476 sync();
477
478 if ((rfd = open(file, O_RDONLY)) < 0) {
479 warn("%s", file);
480 return (1);
481 }
482 if (bread((off_t)SBOFF, &sblock, SBSIZE) == 0) {
57fed2af 483 close(rfd);
984263bc
MD
484 return (1);
485 }
486 sfsp = &statfsbuf;
799e4f0b 487 vsfsp = &statvfsbuf;
984263bc
MD
488 sfsp->f_type = 1;
489 strcpy(sfsp->f_fstypename, "ufs");
490 sfsp->f_flags = 0;
799e4f0b
MD
491 sfsp->f_bsize = vsfsp->f_bsize = sblock.fs_fsize;
492 sfsp->f_iosize = vsfsp->f_frsize = sblock.fs_bsize;
493 sfsp->f_blocks = vsfsp->f_blocks = sblock.fs_dsize;
494 sfsp->f_bfree = vsfsp->f_bfree =
495 sblock.fs_cstotal.cs_nbfree * sblock.fs_frag +
984263bc 496 sblock.fs_cstotal.cs_nffree;
799e4f0b
MD
497 sfsp->f_bavail = vsfsp->f_bavail = freespace(&sblock, sblock.fs_minfree);
498 sfsp->f_files = vsfsp->f_files = sblock.fs_ncg * sblock.fs_ipg;
499 sfsp->f_ffree = vsfsp->f_ffree = sblock.fs_cstotal.cs_nifree;
984263bc
MD
500 sfsp->f_fsid.val[0] = 0;
501 sfsp->f_fsid.val[1] = 0;
502 if ((mntpt = getmntpt(file)) == 0)
503 mntpt = "";
504 memmove(&sfsp->f_mntonname[0], mntpt, (size_t)MNAMELEN);
505 memmove(&sfsp->f_mntfromname[0], file, (size_t)MNAMELEN);
799e4f0b 506 prtstat(sfsp, vsfsp, mwp);
57fed2af 507 close(rfd);
984263bc
MD
508 return (0);
509}
510
511int
512bread(off_t off, void *buf, int cnt)
513{
514 ssize_t nr;
515
57fed2af 516 lseek(rfd, off, SEEK_SET);
984263bc
MD
517 if ((nr = read(rfd, buf, (size_t)cnt)) != (ssize_t)cnt) {
518 /* Probably a dismounted disk if errno == EIO. */
519 if (errno != EIO)
57fed2af 520 fprintf(stderr, "\ndf: %lld: %s\n",
984263bc
MD
521 (long long)off, strerror(nr > 0 ? EIO : errno));
522 return (0);
523 }
524 return (1);
525}
526
527void
528usage(void)
529{
530
57fed2af 531 fprintf(stderr,
984263bc
MD
532 "usage: df [-b | -H | -h | -k | -m | -P] [-ailn] [-t type] [file | filesystem ...]\n");
533 exit(EX_USAGE);
534}
535
536char *
537makenetvfslist(void)
538{
539 char *str, *strptr, **listptr;
540 int mib[3], maxvfsconf, cnt=0, i;
541 size_t miblen;
542 struct ovfsconf *ptr;
543
544 mib[0] = CTL_VFS; mib[1] = VFS_GENERIC; mib[2] = VFS_MAXTYPENUM;
545 miblen=sizeof(maxvfsconf);
546 if (sysctl(mib, (unsigned int)(sizeof(mib) / sizeof(mib[0])),
547 &maxvfsconf, &miblen, NULL, 0)) {
548 warnx("sysctl failed");
549 return (NULL);
550 }
551
552 if ((listptr = malloc(sizeof(char*) * maxvfsconf)) == NULL) {
553 warnx("malloc failed");
554 return (NULL);
555 }
556
557 for (ptr = getvfsent(); ptr; ptr = getvfsent())
558 if (ptr->vfc_flags & VFCF_NETWORK) {
559 listptr[cnt++] = strdup(ptr->vfc_name);
560 if (listptr[cnt-1] == NULL) {
561 warnx("malloc failed");
562 return (NULL);
563 }
564 }
565
566 if (cnt == 0 ||
567 (str = malloc(sizeof(char) * (32 * cnt + cnt + 2))) == NULL) {
568 if (cnt > 0)
569 warnx("malloc failed");
570 free(listptr);
571 return (NULL);
572 }
573
574 *str = 'n'; *(str + 1) = 'o';
575 for (i = 0, strptr = str + 2; i < cnt; i++, strptr++) {
576 strncpy(strptr, listptr[i], 32);
577 strptr += strlen(listptr[i]);
578 *strptr = ',';
579 free(listptr[i]);
580 }
eecd52b2 581 *(--strptr) = '\0';
984263bc
MD
582
583 free(listptr);
584 return (str);
585}