| To: | Eric Sandeen <sandeen@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 15/19] mkfs: don't treat files as though they are block devices |
| From: | Jan Tulak <jtulak@xxxxxxxxxx> |
| Date: | Wed, 13 Apr 2016 17:43:15 +0200 |
| Cc: | xfs-oss <xfs@xxxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <5708811C.5090909@xxxxxxxxxxx> |
| References: | <1458818136-56043-1-git-send-email-jtulak@xxxxxxxxxx> <1458818136-56043-16-git-send-email-jtulak@xxxxxxxxxx> <5706FA7C.7020103@xxxxxxxxxxx> <CACj3i73JEzCj-4kp3=H9mjXCKYgcOUYCOyq-aZSWZFXUih+0MA@xxxxxxxxxxxxxx> <5708811C.5090909@xxxxxxxxxxx> |
But what about this? case D_NAME:    xi.dname = getstr(value, &dopts, D_   NAME); [...] if (argc - optind > 1) {    [print error] } else if (argc - optind == 1) {    Âdfile = xi.volname = getstr(argv[optind], &dopts, D_NAME); } else    Âdfile = xi.dname;â Â} [ â... until the first occurence of dfile] check_device_type(dfile, &xi.disfile, !dsize, !dfile,     ÂNflag ? NULL : &xi.dcreat, force_overwrite, "d"); â âso if there is -d name= and nothing at the end, then dfile contains D_NAME value. If there is a path at the end, then, then no matter about -d name, we have dfile filled with something. So I can't find a way how to have dfile == NULL without omitting both a path as the last argument, and -dname... The no_name (!dfile) argument is inÂcheck_device_type() for a single reason - raising error on if (*isfile && (no_size || no_name)) But !string is true only when string==NULL. For an empty string: !"" is 0. So I don't see the reason for no_name argument at all - it seems to confuse, and in current use can be replaced with test to NULL, or !name. DTTO for xi.logname/xi.rtname. âCheers, Janâ |
| Previous by Date: | Re: [PATCH 00/11 v3] xfs: inode reclaim vs the world, Darrick J. Wong |
|---|---|
| Next by Date: | Re: [PATCH 17/19] xfsprogs: disable truncating of files, Eric Sandeen |
| Previous by Thread: | Re: [PATCH 15/19] mkfs: don't treat files as though they are block devices, Eric Sandeen |
| Next by Thread: | Re: [PATCH 15/19] mkfs: don't treat files as though they are block devices, Jan Tulak |
| Indexes: | [Date] [Thread] [Top] [All Lists] |