delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=W5Rr+EA0Tmq3r0Kqvod9lp2YA/84F5ib31Lj9F88QGoowGwMU+c/5 | |
72uZxjofG4m+15C9tFTSHNKcXwlGvD/CH1U2wVfl8/4W6GfFs+Ny0N/XpCp+RtRG | |
8ELIumS53RQWOHitoPw4Nh4NIzuYr9/y0zr4TMJEY+RtpRa16wR5PU= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=gSJGXymuSHcOC1dNA8JqqipkM0w=; b=kMhtsw3KT0epa250YbiC7T8thRdR | |
7H6GEo12VmEd9mNIxVp1aa968PnfoGJHPR+0gOEz4S/YCikgVK95MabF52dff2DZ | |
CeL9N2P30yXUL1jLwkTIVxiDgdISUwNUtjHDbQCYid0hbAG/43+UO8rEPDuGESQe | |
6q0QNnJsU6nOrTM= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Spam-SWARE-Status: | No, score=-105.4 required=5.0 tests=BAYES_00,GIT_PATCH_2,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=Hx-languages-length:2761, penny, Penny, viewing |
X-HELO: | mout.kundenserver.de |
Date: | Wed, 30 Jan 2019 15:00:56 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: [ANNOUNCEMENT] TEST: Cygwin 3.0.0-0.1 |
Message-ID: | <20190130140056.GF3912@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <announce DOT 20190129195959 DOT GZ3912 AT calimero DOT vinschen DOT de> <5c50f38f DOT 1c69fb81 DOT 544d5 DOT 8d5e AT mx DOT google DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <5c50f38f.1c69fb81.544d5.8d5e@mx.google.com> |
User-Agent: | Mutt/1.10.1 (2018-07-13) |
--l5oECiFRo5dp+2y7 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Jan 29 16:45, Steven Penny wrote: > On Tue, 29 Jan 2019 20:59:59, Corinna Vinschen wrote: > > - New file ioctls's FS_IOC_GETFLAGS and FS_IOC_SETFLAGS. The actual > > inode flags are Cygwin-specific. This allows to set or reset > > DOS attributes, file sparseness, FS level encryption and compression, > > as well as directory case sensitivity programatically. > >=20 > > - New tools chattr(1) and lsattr(1) to utilize setting and viewing the > > aforementioned new ioctl's on the command line. >=20 > these are very much appreciated. going back to my previous post: >=20 > https://cygwin.com/ml/cygwin/2018-12/msg00163.html >=20 > i re-ran with the new tool, however i am getting unexpected result: >=20 > $ lsattr /cygdrive/c > -hs--------- /cygdrive/c/$Recycle.Bin > -hs--------- /cygdrive/c/Config.Msi > ------------ /cygdrive/c/cygwin64 > lsattr: Device or resource busy while trying to open /cygdrive/c/pagefile= .sys > ------------ /cygdrive/c/PerfLogs > r----------- /cygdrive/c/Program Files > r----------- /cygdrive/c/Program Files (x86) > -h-------n-- /cygdrive/c/ProgramData > -hs------n-- /cygdrive/c/Recovery > -hs--------- /cygdrive/c/System Volume Information > r----------- /cygdrive/c/Users > ------------ /cygdrive/c/Windows >=20 > compare with cmd.exe: >=20 > > dir /A C:\ > 2018-10-08 11:20 AM <DIR> $Recycle.Bin > 2019-01-10 05:20 PM <DIR> Config.Msi > 2019-01-29 06:33 PM <DIR> cygwin64 > 2009-07-13 11:08 PM <JUNCTION> Documents and Settings [C:\Users] > 2018-10-08 07:48 PM <DIR> NVIDIA > 2018-12-23 09:57 AM 17,138,294,784 pagefile.sys > 2009-07-13 09:20 PM <DIR> PerfLogs > 2019-01-01 02:10 PM <DIR> Program Files > 2018-12-19 01:19 PM <DIR> Program Files (x86) > 2018-10-31 06:07 PM <DIR> ProgramData > 2018-10-08 11:14 AM <DIR> Recovery > 2019-01-29 03:36 PM <DIR> System Volume Information > 2018-11-18 01:10 AM <DIR> Users > 2018-11-09 08:18 AM <DIR> Windows >=20 > or attrib: >=20 > > attrib C:\pagefile.sys > A SH C:\pagefile.sys Ah, that's easily explained. lsattr has to open the file with read perms to be allowed to call ioctl on the file descriptor: fd =3D open (filename, O_RDONLY); ioctl (fd, FS_IOC_GETFLAGS, &flags); close (fd); But that's disallowed for certain files. pagefile.sys, for instance, always results in a sharing violation when trying to open it. cmd's dir as well as attrib don't even try to open the file. Both open the directory and print the attributes from the directory information. Nothing I can do about for now. We could add another ioctl at one point which operates on the parent dir, kind of like: fd_dir =3D open (parent_dir, O_RDONLY); ioctl (fd_dir, FS_IOC_GETFLAGS_FILE, filename, &flags); close (fd_dir) Patches welcome. Corinna --=20 Corinna Vinschen Cygwin Maintainer --l5oECiFRo5dp+2y7 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlxRrhgACgkQ9TYGna5E T6DYAA//dV8k+ciZH45joOtvoTcF9HsdBdjG+i/sKh7lvdtOC59sHoPvkGFUdClP xocBe6BUeT/h69drEV5IHz1Ed0YN7+13R68Sm6uvTxctnWE42eTO+0dYC70xfn6p BVdPslAKJvHmF4yr3d2d5/eCIVUUS456aiHmxZqqHIgp/j3x17G9kCUUoP2K59MX dyQTenk0VL3wT4PnWcOt/LKrHdAEu/4GrRtWkyA/87y9uv6HmIbW6VMcIy7uQ1+N 1A+IB0cqIJblSC+Gb7s+0NvajH6vYnKDKBGHJPXy8UKDtiQA/pX2uBy+4sQJhhXx 8dogMa5tkuHBXjn/ojOHB8IjchYSinWhHCSXUzcEyLAS7roUZN/WaotaWIuDaRSb DnZWz8FSXv21+NVgyl1UA8Xt/U0oNkYkT1SnWKFaNQnAOvHwUAwSi9VYwGxA1KpP cNZJMSKQ2iF0ybxuMyuNWKL7O737RAbrbd/xAKtQbT72ke0zpCUOuRWZl5PgV/Lx /kfnmSsgwgiwxTFyE0zpfzoI9pG4mgyrsqVYwcSzeq0hwiFqcDLAtav38ivKUutH sOK/+VP4uEnr2LRIatKQtExZwR/6PpaJK2bZYK4RAyEcATHvHPHjqrNnqvyO4xVb PnLep1JoCQLaxTrmxbqNi6TqjzHvmt13QAsTEdI8XoQC9l9NmBA= =yugh -----END PGP SIGNATURE----- --l5oECiFRo5dp+2y7--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |