Re: [PATCH v2] procfs: set d_type on returned direntries

2025-01-20 Thread Diego Nieto Cid
On Tue, Jan 21, 2025 at 01:02:12AM +0100, Samuel Thibault wrote: > > Sorry for the back&forth, we couldn't know before trying. > No problem, I'll drop this patch then. Thanks

Re: [PATCH v2] procfs: set d_type on returned direntries

2025-01-20 Thread Samuel Thibault
c. That becomes actually quite heavy. I'm now thinking that perhaps best would be to make libgtop use lstat as readdir says. Sorry for the back&forth, we couldn't know before trying. Samuel > That are all the comments for version 2 of the patch. > > Regards, >

[PATCH v2] procfs: set d_type on returned direntries

2025-01-20 Thread dnietoc
ink I got the locking correctly. That are all the comments for version 2 of the patch. Regards, Diego -- >8 -- >8 -- >8 -- --- procfs/netfs.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/procfs/netfs.c b/procfs/netfs.c index 4ed5eab6..83db7517

Re: [PATCH] procfs: set d_type on returned direntries

2025-01-20 Thread Samuel Thibault
Hello, dnie...@gmail.com, le dim. 19 janv. 2025 23:50:10 +, a ecrit: > diff --git a/procfs/netfs.c b/procfs/netfs.c > index 4ed5eab6..3cf7a8e2 100644 > --- a/procfs/netfs.c > +++ b/procfs/netfs.c > @@ -115,6 +115,29 @@ error_t netfs_attempt_readlink (struct iouser *user, &g

[PATCH] procfs: set d_type on returned direntries

2025-01-19 Thread dnietoc
From: Diego Nieto Cid Hello, This sets d_type to DT_DIR in those entries of procfs which are actually directories; which allows libgtop to list processes using the linux port code. Hope this is what you had in mind Samuel. It's not very robust, but I couldn't find other way to do it

[web:add translator pages 07/15] tweak the translator/procfs page

2024-10-16 Thread jbra...@dismail.de
* hurd/translator.mdwn: link to procfs * hurd/translator.mdwn: tweak the page a little. --- hurd/translator.mdwn| 1 + hurd/translator/procfs.mdwn | 14 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hurd/translator.mdwn b/hurd/translator.mdwn index

Re: [PATCH hurd 2/6] procfs: remove unused rootdir_symlink_make_node

2024-09-08 Thread Samuel Thibault
Applied, thanks! Flavio Cruz, le dim. 21 janv. 2024 16:07:53 -0500, a ecrit: > Not needed since b2c97e251bb470e6f967c716081675a96dbde59c > --- > procfs/rootdir.c | 8 > 1 file changed, 8 deletions(-) > > diff --git a/procfs/rootdir.c b/procfs/rootdir.c > index 77

[PATCH hurd 2/6] procfs: remove unused rootdir_symlink_make_node

2024-01-21 Thread Flavio Cruz
Not needed since b2c97e251bb470e6f967c716081675a96dbde59c --- procfs/rootdir.c | 8 1 file changed, 8 deletions(-) diff --git a/procfs/rootdir.c b/procfs/rootdir.c index 7742edd..206a541 100644 --- a/procfs/rootdir.c +++ b/procfs/rootdir.c @@ -706,14 +706,6 @@ rootdir_file_make_node

[PATCH 35/41] procfs: Port to x86_64

2023-05-08 Thread Sergey Bugaev
--- procfs/process.c | 18 +- procfs/rootdir.c | 8 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/procfs/process.c b/procfs/process.c index eaf5f45b..3170b775 100644 --- a/procfs/process.c +++ b/procfs/process.c @@ -162,17 +162,17

Re: [PATCH] procfs: Fix process creation time in /proc/pid/stat

2023-04-18 Thread Samuel Thibault
Applied, thanks! Sergey Bugaev, le mar. 18 avril 2023 13:49:02 +0300, a ecrit: > This was always showing up as 0, because apparently we need to query > creation_time for the task, not a thread. > > Here's a before vs after comparison: > > $ cat /proc/self/stat ~/procfs/se

[PATCH] procfs: Fix process creation time in /proc/pid/stat

2023-04-18 Thread Sergey Bugaev
This was always showing up as 0, because apparently we need to query creation_time for the task, not a thread. Here's a before vs after comparison: $ cat /proc/self/stat ~/procfs/self/stat 11151 (cat) S 26571 11151 26571 0 0 0 0 0 0 0 1 0 0 0 20 0 2 0 0 154783744 251 0 134443008 134477480

Re: [PATCH v4 1/1] procfs: Populate /proc/route with network routes

2022-09-21 Thread Samuel Thibault
Applied, thanks! Damien Zammit, le mar. 20 sept. 2022 03:01:59 +, a ecrit: > --- > procfs/Makefile | 2 +- > procfs/rootdir.c | 77 > 2 files changed, 78 insertions(+), 1 deletion(-) > > diff --git a/procfs/Makefile

[PATCH v4 1/1] procfs: Populate /proc/route with network routes

2022-09-19 Thread Damien Zammit
--- procfs/Makefile | 2 +- procfs/rootdir.c | 77 2 files changed, 78 insertions(+), 1 deletion(-) diff --git a/procfs/Makefile b/procfs/Makefile index 13ee026c..d32328d2 100644 --- a/procfs/Makefile +++ b/procfs/Makefile @@ -21,7 +21,7

Re: [PATCH v3 2/2] procfs: Populate /proc/route with network routes

2022-09-11 Thread Samuel Thibault
Hello, Damien Zammit, le ven. 09 sept. 2022 09:43:01 +, a ecrit: > This requires the new client side to be installed. I'm not sure to understand what you mean. The installed comes from the glibc package, not the hurd package. > diff --git a/procfs/rootdir.c b/procfs/rootdi

[PATCH v3 2/2] procfs: Populate /proc/route with network routes

2022-09-09 Thread Damien Zammit
This requires the new client side to be installed. --- procfs/Makefile | 2 +- procfs/rootdir.c | 78 2 files changed, 79 insertions(+), 1 deletion(-) diff --git a/procfs/Makefile b/procfs/Makefile index 13ee026c..d32328d2 100644 --- a/procfs

Re: [PATCH v2 2/2] procfs: Populate /proc/route with network routes

2022-09-05 Thread Samuel Thibault
Hello, The principe looks good, just a few comments below. Samuel Damien Zammit, le ven. 02 sept. 2022 09:06:38 +, a ecrit: > diff --git a/procfs/rootdir.c b/procfs/rootdir.c > index 0e7c05c00..deddaa43f 100644 > --- a/procfs/rootdir.c > +++ b/procfs/rootdir.c > @@ -408,6

[PATCH v2 2/2] procfs: Populate /proc/route with network routes

2022-09-02 Thread Damien Zammit
This exposes network routing table on /proc/route --- procfs/Makefile | 2 +- procfs/rootdir.c | 74 2 files changed, 75 insertions(+), 1 deletion(-) diff --git a/procfs/Makefile b/procfs/Makefile index 13ee026c4..d32328d28 100644 --- a/procfs

[PATCH 3/3] procfs: Populate /proc/route with network routes

2022-08-31 Thread Damien Zammit
--- procfs/Makefile | 2 +- procfs/rootdir.c | 43 +++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/procfs/Makefile b/procfs/Makefile index 13ee026c4..d32328d28 100644 --- a/procfs/Makefile +++ b/procfs/Makefile @@ -21,7 +21,7

Re: [PATCH 1/1] procfs: Fix use-after-free

2021-05-24 Thread Samuel Thibault
s/nref.c:26 > #5 0x0804c9f4 in rootdir_make_translated_node (dir_hook=0x10001990, > entry_hook=0x8055180 <__compound_literal.8>) > at ../../procfs/rootdir.c:674 > #6 0x0804ace3 in procfs_dir_lookup (hook=0x10001c10, name=0x2857efc > "mounts", np=0x2855d68)

[PATCH 1/1] procfs: Fix use-after-free

2021-05-24 Thread Sergey Bugaev
5009a0) at ../../libshouldbeinlibc/refcount.h:170 #4 netfs_nref (np=0x15008f0) at ../../libnetfs/nref.c:26 #5 0x0804c9f4 in rootdir_make_translated_node (dir_hook=0x10001990, entry_hook=0x8055180 <__compound_literal.8>) at ../../procfs/rootdir.c:674 #6 0x0804ace3 in procfs_dir_lookup

[PATCH 0/1] Fix that procfs crash

2021-05-24 Thread Sergey Bugaev
This fixes the procfs crash that happens on shutdown, previously discussed here: https://lists.debian.org/debian-hurd/2021/04/msg00035.html Sergey Bugaev (1): procfs: Fix use-after-free procfs/rootdir.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- 2.31.1

[PATCH 2/2] procfs: Add debug for failing EIO

2021-05-07 Thread Damien Zammit
--- procfs/process.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/procfs/process.c b/procfs/process.c index 6e4c1515..61e7cde4 100644 --- a/procfs/process.c +++ b/procfs/process.c @@ -387,9 +387,12 @@ process_file_get_contents (void *hook, char **contents, ssize_t

[PATCH 4/4] procfs: Add debug for failing EIO

2021-04-17 Thread Damien Zammit
--- procfs/process.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/procfs/process.c b/procfs/process.c index 6e4c1515..61e7cde4 100644 --- a/procfs/process.c +++ b/procfs/process.c @@ -387,9 +387,12 @@ process_file_get_contents (void *hook, char **contents, ssize_t

Re: [PATCH] fix compiler warnings in hurd/procfs

2016-05-23 Thread Thomas Schwinge
Hi! On Tue, 29 Dec 2015 23:11:26 +0100, Flavio Cruz wrote: > procfs: Fix compiler warnings. > > * include/sys/procfs.h: Change uintptr_t to vm_address_t. > * procfs/process.c: Fix format strings. > * procfs/rootdir.c: Add missing casts. (Note that the header file does not relat

[PATCH 6/8] procfs: Use refcounts_t to track node references.

2016-03-06 Thread Flavio Cruz
* procfs/netfs.c: Remove use of netfs_node_refcnt_lock. --- procfs/netfs.c | 4 1 file changed, 4 deletions(-) diff --git a/procfs/netfs.c b/procfs/netfs.c index 276c57c..0b3d31a 100644 --- a/procfs/netfs.c +++ b/procfs/netfs.c @@ -222,12 +222,8 @@ error_t netfs_attempt_lookup (struct

Re: [PATCH] fix compiler warnings in hurd/procfs

2015-12-29 Thread Samuel Thibault
Applied, thanks!

[PATCH] fix compiler warnings in hurd/procfs

2015-12-29 Thread Flavio Cruz
--- procfs: Fix compiler warnings. * include/sys/procfs.h: Change uintptr_t to vm_address_t. * procfs/process.c: Fix format strings. * procfs/rootdir.c: Add missing casts. diff --git a/include/sys/procfs.h b/include/sys/procfs.h index ec82308..09d2030 100644 --- a/include/sys/procfs.h +++ b

[PATCH] Small Hacks: procfs' cpuinfo

2015-08-18 Thread Diego Nieto Cid
]]. * Add a relatime or lazytime option to ext2fs. * Fix our [[open_issues/symlink_translator]]. +* Add `/proc/cpuinfo` support to procfs. This work could be based on some patches produced in 2011 by Bouju Alain, see <https://lists.gnu.org/archive/html/bug-hurd/2011-11/msg00079.h

[PATCH 7/7] procfs: Fix typos in comments (found by codespell)

2015-01-03 Thread Stefan Weil
Signed-off-by: Stefan Weil --- procfs/TODO | 2 +- procfs/main.c| 2 +- procfs/process.c | 4 ++-- procfs/procfs.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/procfs/TODO b/procfs/TODO index 952d67b..90e4420 100644 --- a/procfs/TODO +++ b/procfs/TODO @@ -12,7

[patch #8586] Make sure to free content dir in procfs

2014-12-25 Thread Lancelot SIX
URL: <http://savannah.gnu.org/patch/?8586> Summary: Make sure to free content dir in procfs Project: The GNU Hurd Submitted by: lsix Submitted on: Thu 25 Dec 2014 09:14:06 PM GMT Category: othe

Re: [PATCH 2/8] procfs: do not hard-code the default argument values

2014-10-05 Thread Samuel Thibault
Justus Winter, le Fri 05 Sep 2014 10:42:56 +0200, a écrit : > * procfs/main.c (common_options): If possible, do not hard-code the > default values. Ack. > --- > procfs/main.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/procfs/main.c b/

Re: [PATCH 7/7] procfs: provide magic retry response for /proc/self

2014-10-01 Thread Roland McGrath
> > + "proc/self/..." means replace `proc/self' with the PID of the current > > +process and then retry as for FS_RETRY_NORMAL. > > Roland, does it look OK to use a FS_RETRY_MAGICAL for implementing > /proc/self? FS_RETRY_MAGICAL is appropriate. But the string itself should m

Re: [PATCH 7/7] procfs: provide magic retry response for /proc/self

2014-09-30 Thread Samuel Thibault
Hello, Justus Winter, le Mon 22 Sep 2014 11:38:44 +0200, a écrit : > diff --git a/hurd/hurd_types.h b/hurd/hurd_types.h > index 4341177..f22816d 100644 > --- a/hurd/hurd_types.h > +++ b/hurd/hurd_types.h > @@ -114,6 +114,9 @@ enum retry_type > as for FS_RETRY_NORMAL. > >

Re: [PATCH 6/7] procfs: reorganize rootdir.c

2014-09-28 Thread Samuel Thibault
Justus Winter, le Mon 22 Sep 2014 11:38:43 +0200, a écrit : > * procfs/rootdir.c: Move the translator linkage code to the > appropriate location. Ack. > --- > procfs/rootdir.c | 153 > --- > 1 file changed, 77 insertion

Re: [PATCH 5/7] procfs: generalize the translator linkage code

2014-09-28 Thread Samuel Thibault
Justus Winter, le Mon 22 Sep 2014 11:38:42 +0200, a écrit : > Generalize the translator linkage code previously introduced for the > `mounts' node. Ack. > * procfs/rootdir.c (struct procfs_translated_node_ops): New > specialized node operations structure for

Re: [PATCH 4/7] procfs: do not test whether /hurd/mtab exists

2014-09-28 Thread Samuel Thibault
Justus Winter, le Mon 22 Sep 2014 11:38:41 +0200, a écrit : > Now that procfs is merged into the Hurd repository we can just assume > that the mtab translator exists. Ack > * procfs/rootdir.c (rootdir_mounts_exists): Drop function. > (rootdir_entries): Adjust accordingly. >

Re: [PATCH 3/7] procfs: implement /proc/N/mounts

2014-09-28 Thread Samuel Thibault
Justus Winter, le Mon 22 Sep 2014 11:38:40 +0200, a écrit : > * procfs/process.c (process_gc_mounts): New function. > (process_symlink_make_node): Likewise. > (entries): Use the new functions to provide a symlink to ../mounts. Mmm, I wouldn't lie like this: don't we have per-pr

Re: [PATCH 2/7] procfs: implement /proc/filesystems

2014-09-28 Thread Samuel Thibault
Justus Winter, le Mon 22 Sep 2014 11:38:39 +0200, a écrit : > * procfs/rootdir.c (rootdir_gc_filesystems): New function. > (rootdir_entries): Use the new function to implement /proc/filesystems. Ack. > --- > procfs/rootdir.c | 61 > ++

Re: [PATCH 1/7] procfs: implement /proc/N/maps

2014-09-28 Thread Samuel Thibault
Justus Winter, le Mon 22 Sep 2014 11:38:38 +0200, a écrit : > Fixes https://savannah.gnu.org/bugs/?32770 . Ack. > * procfs/process.c (process_file_gc_maps): New function. > (entries): Use the new function to implement /proc/N/maps. > --- > procfs/

[PATCH 7/7] procfs: provide magic retry response for /proc/self

2014-09-22 Thread Justus Winter
* hurd/hurd_types.h: Document the magic retry string `proc/self'. * hurd/paths.h (_HURD_MAGIC): New macro. * procfs/main.c: Remove all code related to faking /proc/self. * procfs/main.h: Likewise. * procfs/rootdir.c: Likewise. Instead, return the magic retry response `proc/self' for

[PATCH 6/7] procfs: reorganize rootdir.c

2014-09-22 Thread Justus Winter
* procfs/rootdir.c: Move the translator linkage code to the appropriate location. --- procfs/rootdir.c | 153 --- 1 file changed, 77 insertions(+), 76 deletions(-) diff --git a/procfs/rootdir.c b/procfs/rootdir.c index a04fb3e..d68645e 100644

[PATCH 1/7] procfs: implement /proc/N/maps

2014-09-22 Thread Justus Winter
Fixes https://savannah.gnu.org/bugs/?32770 . * procfs/process.c (process_file_gc_maps): New function. (entries): Use the new function to implement /proc/N/maps. --- procfs/process.c | 104 ++- 1 file changed, 103 insertions(+), 1 deletion

[PATCH 5/7] procfs: generalize the translator linkage code

2014-09-22 Thread Justus Winter
Generalize the translator linkage code previously introduced for the `mounts' node. * procfs/rootdir.c (struct procfs_translated_node_ops): New specialized node operations structure for translated nodes. (rootdir_mounts_make_node): Generalize and rename to rootdir_make_translated_node.

[PATCH 2/7] procfs: implement /proc/filesystems

2014-09-22 Thread Justus Winter
* procfs/rootdir.c (rootdir_gc_filesystems): New function. (rootdir_entries): Use the new function to implement /proc/filesystems. --- procfs/rootdir.c | 61 +++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/procfs/rootdir.c b

[PATCH 4/7] procfs: do not test whether /hurd/mtab exists

2014-09-22 Thread Justus Winter
Now that procfs is merged into the Hurd repository we can just assume that the mtab translator exists. * procfs/rootdir.c (rootdir_mounts_exists): Drop function. (rootdir_entries): Adjust accordingly. --- procfs/rootdir.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/procfs

[PATCH 3/7] procfs: implement /proc/N/mounts

2014-09-22 Thread Justus Winter
* procfs/process.c (process_gc_mounts): New function. (process_symlink_make_node): Likewise. (entries): Use the new functions to provide a symlink to ../mounts. --- procfs/process.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/procfs/process.c b/procfs

Re: [PATCH 4/6] procfs: generalize the translator linkage code

2014-09-21 Thread Justus Winter
Quoting Justus Winter (2014-09-21 12:12:34) > Generalize the translator linkage code previously introduced for the > `mounts' node. > ... > (ROOTDIR_DEFINE_TRANSLATED_NODE): New convenience macro to define > translated nodes. > ... > +#define ROOTDIR_DEFINE_TRANSLATED_NODE(ARGZ)

[PATCH 3/6] procfs: do not test whether /hurd/mtab exists

2014-09-21 Thread Justus Winter
Now that procfs is merged into the Hurd repository we can just assume that the mtab translator exists. * procfs/rootdir.c (rootdir_mounts_exists): Drop function. (rootdir_entries): Adjust accordingly. --- procfs/rootdir.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/procfs

[PATCH 5/6] procfs: reorganize rootdir.c

2014-09-21 Thread Justus Winter
* procfs/rootdir.c: Move the translator linkage code to the appropriate location. --- procfs/rootdir.c | 153 --- 1 file changed, 77 insertions(+), 76 deletions(-) diff --git a/procfs/rootdir.c b/procfs/rootdir.c index 32e46a0..6f0604a 100644

[PATCH 1/6] procfs: implement /proc/N/mounts

2014-09-21 Thread Justus Winter
* procfs/process.c (process_gc_mounts): New function. (process_symlink_make_node): Likewise. (entries): Use the new functions to provide a symlink to ../mounts. --- procfs/process.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/procfs/process.c b/procfs

[PATCH 6/6] procfs: provide magic retry response for /proc/self

2014-09-21 Thread Justus Winter
* hurd/paths.h (_HURD_MAGIC): New macro. * procfs/main.c: Remove all code related to faking /proc/self. * procfs/main.h: Likewise. * procfs/rootdir.c: Likewise. Instead, return the magic retry response `proc/self' for the `self' node. --- hurd/paths.h | 1 + procfs/main

[PATCH 4/6] procfs: generalize the translator linkage code

2014-09-21 Thread Justus Winter
Generalize the translator linkage code previously introduced for the `mounts' node. * procfs/rootdir.c (struct procfs_translated_node_ops): New specialized node operations structure for translated nodes. (rootdir_mounts_make_node): Generalize and rename to rootdir_make_translated_node.

[PATCH 2/2] procfs: implement /proc/filesystems

2014-09-18 Thread Justus Winter
* procfs/rootdir.c (rootdir_gc_filesystems): New function. (rootdir_entries): Use the new function to implement /proc/filesystems. --- procfs/rootdir.c | 61 +++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/procfs/rootdir.c b

[PATCH 1/2] procfs: implement /proc/N/maps

2014-09-18 Thread Justus Winter
Fixes https://savannah.gnu.org/bugs/?32770 . * procfs/process.c (process_file_gc_maps): New function. (entries): Use the new function to implement /proc/N/maps. --- procfs/process.c | 104 ++- 1 file changed, 103 insertions(+), 1 deletion

[PATCH 2/8] procfs: do not hard-code the default argument values

2014-09-05 Thread Justus Winter
* procfs/main.c (common_options): If possible, do not hard-code the default values. --- procfs/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/procfs/main.c b/procfs/main.c index f3067d9..36a2d25 100644 --- a/procfs/main.c +++ b/procfs/main.c @@ -142,13 +142,13

Missed to change the kernel pid in procfs

2014-09-05 Thread Justus Winter
Hi, I missed procfs, which has to be told the new kernel pid. Also, I realize that these changes are a pita to build Debian packages from. You can grab the packaging bits from git://darnassus.sceen.net/teythoon/packaging/hurd.git and binary packages from deb http://darnassus.sceen.net

Please merge procfs into the Hurd repository

2014-04-07 Thread Justus Winter
Dear maintainer :) please merge procfs (found in [0]) into the main Hurd repository. 0: git://git.sv.gnu.org/hurd/procfs.git Rationale: The procfs translator provides a Linux-compatible /proc filesystem. While there is no standard that defines the /proc filesystem, a lot of software depends on

Re: [PATCH 4/6] procfs: handle the --update parameter

2013-08-28 Thread Samuel Thibault
Applied remaining patches, thanks! Samuel

[PATCH 2/7] initscripts: add -ocompatible to procfs mounts on Hurd

2013-08-15 Thread Justus Winter
/changelog @@ -52,6 +52,7 @@ sysvinit (2.88dsf-42) UNRELEASED; urgency=low [ Justus Winter ] * mount-functions.sh: Hurd has a tmpfs translator now, remove workaround. + * mount-functions.sh: Add -ocompatible to procfs mounts on Hurd. -- Roger Leigh Sat, 04 May 2013 13:13:51 +0100 diff

Re: [PATCH] procfs: Ignore arguments for compatibility with Linux' procfs.

2013-07-20 Thread Samuel Thibault
Justus Winter, le Tue 09 Jul 2013 08:22:09 +0200, a écrit : > Ignore the --nodev, --noexec and --nosuid arguments. Applied, thanks! Samuel

Re: [PATCH] procfs: Ignore arguments for compatibility with Linux' procfs.

2013-07-16 Thread Justus Winter
Quoting Justus Winter (2013-07-09 08:22:09) > Ignore the --nodev, --noexec and --nosuid arguments. > > * procfs/main.c (argp_parser): Ignore some arguments for compatibility. > --- Ping.

Re: Passive translators (was: [PATCH] procfs: Ignore arguments for compatibility with Linux' procfs.)

2013-07-15 Thread Samuel Thibault
Thomas Schwinge, le Tue 09 Jul 2013 15:40:18 +0200, a écrit : > Is the passive translator setting meant to go away then? Nope. But concerning Debian, it'll be easier for maintenance of the "standard" places (/proc, /tmp, etc.) to use active translators started at root, to avoid differing too much

Passive translators (was: [PATCH] procfs: Ignore arguments for compatibility with Linux' procfs.)

2013-07-09 Thread Thomas Schwinge
Hi! On Tue, 09 Jul 2013 15:00:00 +0200, Justus Winter <4win...@informatik.uni-hamburg.de> wrote: > Quoting Pino Toscano (2013-07-09 10:52:56) > > Alle martedì 9 luglio 2013, Justus Winter ha scritto: > > > Ignore the --nodev, --noexec and --nosuid arguments. > > > > Why nodev? The only consumer

Re: [PATCH] procfs: Ignore arguments for compatibility with Linux' procfs.

2013-07-09 Thread Justus Winter
Quoting Pino Toscano (2013-07-09 10:52:56) > Hi, > > Alle martedì 9 luglio 2013, Justus Winter ha scritto: > > Ignore the --nodev, --noexec and --nosuid arguments. > > Why nodev? The only consumer of it seems to be sysvinit, which has been > patched to not pass nodev also on Hurd (in addition to

Re: [PATCH] procfs: Ignore arguments for compatibility with Linux' procfs.

2013-07-09 Thread Pino Toscano
Hi, Alle martedì 9 luglio 2013, Justus Winter ha scritto: > Ignore the --nodev, --noexec and --nosuid arguments. Why nodev? The only consumer of it seems to be sysvinit, which has been patched to not pass nodev also on Hurd (in addition to kFreeBSD) when mounting /proc. -- Pino Toscano sign

[PATCH 2/8] initscripts: add -ocompatible to procfs mounts on Hurd

2013-07-09 Thread Justus Winter
/changelog @@ -52,6 +52,7 @@ sysvinit (2.88dsf-42) UNRELEASED; urgency=low [ Justus Winter ] * mount-functions.sh: Hurd has a tmpfs translator now, remove workaround. + * mount-functions.sh: Add -ocompatible to procfs mounts on Hurd. -- Roger Leigh Sat, 04 May 2013 13:13:51 +0100 diff

[PATCH] procfs: Ignore arguments for compatibility with Linux' procfs.

2013-07-08 Thread Justus Winter
Ignore the --nodev, --noexec and --nosuid arguments. * procfs/main.c (argp_parser): Ignore some arguments for compatibility. --- procfs/main.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/procfs/main.c b/procfs/main.c index bcf9590..727fea6 100644 --- a/procfs

Re: [PATCH 1/6] procfs: fix the error handling in argp_parser

2013-06-30 Thread Samuel Thibault
lso fix a typo ("the a user") while touching these lines. > > > > > > * procfs/main.c (argp_parser): Proper error handling. > > > (argp_parser): Fix typo. > > > > Applied, thanks. > > > > Oops, I realize I've forgotten to set --aut

Re: [PATCH 1/6] procfs: fix the error handling in argp_parser

2013-06-29 Thread Justus Winter
Quoting Samuel Thibault (2013-06-29 22:11:21) > Justus Winter, le Fri 28 Jun 2013 18:37:40 +0200, a écrit : > > Do not exit using error (1, ..) but gracefully handle the error using > > argp_error. Also fix a typo ("the a user") while touching these lines. > > &

Re: some work on procfs

2013-06-29 Thread Samuel Thibault
I have also applied patches 2 and 3. 4, 5 and 6, more involved author-right-wise, will have to wait for the FSF papers, but they look OK, I'll upload them in the Debian package. Samuel

Re: [PATCH 1/6] procfs: fix the error handling in argp_parser

2013-06-29 Thread Samuel Thibault
Justus Winter, le Fri 28 Jun 2013 18:37:40 +0200, a écrit : > Do not exit using error (1, ..) but gracefully handle the error using > argp_error. Also fix a typo ("the a user") while touching these lines. > > * procfs/main.c (argp_parser): Proper error handling. >

[PATCH 6/6] procfs: provide a more meaningful response to fsys_get_options

2013-06-28 Thread Justus Winter
Implement our own netfs_append_args function that provides the appropriate command line flags if the current values differ from the default values. * procfs/main.c (netfs_append_args): New function. --- procfs/main.c | 42 ++ 1 file changed, 42

[PATCH 5/6] procfs: define macros for the default argument values

2013-06-28 Thread Justus Winter
Define a macro for the default value of each command line parameter. This allows one to generate a minimal response to fsys_get_options requests. * procfs/main.c: New macro definitions for default values. --- procfs/main.c | 17 - 1 file changed, 12 insertions(+), 5 deletions

[PATCH 4/6] procfs: handle the --update parameter

2013-06-28 Thread Justus Winter
Split the argument handling into a common part and one for fsys_update_options. Handle the --update parameter; for procfs this is a no-op. * procfs/main.c (common_options): New variable. (runtime_argp_parser): Handle --update. (startup_argp): New variable. (netfs_runtime_argp_): New variable

[PATCH 2/6] procfs: keep old config values if the parsing fails

2013-06-28 Thread Justus Winter
Previously if strtol failed the previous configuration value would get overwritten. Prevent this by storing the result in a temporary variable and update the configuration if the argument was parsed correctly and passed the sanity checks. * procfs/main.c (argp_parser): Keep old configuration in

[PATCH 3/6] procfs: enable fsys_set_options

2013-06-28 Thread Justus Winter
Make procfs translators handle fsys_set_options requests by pointing netfs_runtime_argp to our argp struct. * procfs/main.c (netfs_runtime_argp): New variable. --- procfs/main.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/procfs/main.c b/procfs/main.c index 0892d36..1b19c01 100644

[PATCH 1/6] procfs: fix the error handling in argp_parser

2013-06-28 Thread Justus Winter
Do not exit using error (1, ..) but gracefully handle the error using argp_error. Also fix a typo ("the a user") while touching these lines. * procfs/main.c (argp_parser): Proper error handling. (argp_parser): Fix typo. --- procfs/main.c | 12 ++-- 1 file changed, 6 insert

Re: [PATCH 1/6] procfs: fix the error handling in argp_parser

2013-06-27 Thread Emilio Pozuelo Monfort
Hi, On 27/06/13 14:31, Justus Winter wrote: > Do not exit using error (1, ..) but gracefully handle the error using > argp_error. > > * procfs/main.c (argp_parser): Proper error handling. > --- > procfs/main.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 d

[PATCH 6/6] procfs: provide a more meaningful response to fsys_get_options

2013-06-27 Thread Justus Winter
Implement our own netfs_append_args function that provides the appropriate command line flags if the current values differ from the default values. * procfs/main.c (netfs_append_args): New function. --- procfs/main.c | 42 ++ 1 file changed, 42

[PATCH 5/6] procfs: define macros for the default argument values

2013-06-27 Thread Justus Winter
Define a macro for the default value of each command line parameter. This allows one to generate a minimal response to fsys_get_options requests. * procfs/main.c: New macro definitions for default values. --- procfs/main.c | 17 - 1 file changed, 12 insertions(+), 5 deletions

[PATCH 4/6] procfs: handle the --update parameter

2013-06-27 Thread Justus Winter
Split the argument handling into a common part and one for fsys_update_options. Handle the --update parameter; for procfs this is a no-op. * procfs/main.c (common_options): New variable. (runtime_argp_parser): Handle --update. (startup_argp): New variable. (netfs_runtime_argp_): New variable

[PATCH 3/6] procfs: enable fsys_set_options

2013-06-27 Thread Justus Winter
Make procfs translators handle fsys_set_options requests by pointing netfs_runtime_argp to our argp struct. * procfs/main.c (netfs_runtime_argp): New variable. --- procfs/main.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/procfs/main.c b/procfs/main.c index f472f04..6251c83 100644

[PATCH 2/6] procfs: keep old config values if the parsing fails

2013-06-27 Thread Justus Winter
Previously if strtol failed the previous configuration value would get overwritten. Prevent this by storing the result in a temporary variable and update the configuration if the argument was parsed correctly and passed the sanity checks. * procfs/main.c (argp_parser): Keep old configuration in

[PATCH 1/6] procfs: fix the error handling in argp_parser

2013-06-27 Thread Justus Winter
Do not exit using error (1, ..) but gracefully handle the error using argp_error. * procfs/main.c (argp_parser): Proper error handling. --- procfs/main.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/procfs/main.c b/procfs/main.c index 3a976cc..e7f8574 100644

some work on procfs

2013-06-27 Thread Justus Winter
Hi, currently procfs doesn't allow one to alter the options at runtime using fsys_set_options. This is necessary to make mount -oremount work. I also noticed that fsys_get_options would only return the translators name, but not its options, so I've implemented this as well. FWIW this i

[bug #27184] Memory leak in procfs

2013-03-03 Thread Pino Toscano
t; Closed ___ Follow-up Comment #1: This problem has been solved with the switch to the new procfs implementation by Jeremie Koenig. ___ Reply to this item at: <http://savannah.gnu.org

Re: [PATCH] procfs: simple implementation of statfs

2012-12-06 Thread Pino Toscano
Alle giovedì 6 dicembre 2012, Thomas Schwinge ha scritto: > Hi! > > On Thu, 6 Dec 2012 17:57:32 +0100, Pino Toscano wrote: > > Initial implementation of statfs reply, just returning the > > filesystem type and its id. > > > > * netfs.c: Include and . > > (netfs_attempt_statfs): Implement. > >

Re: [PATCH] procfs: simple implementation of statfs

2012-12-06 Thread Thomas Schwinge
Hi! On Thu, 6 Dec 2012 17:57:32 +0100, Pino Toscano wrote: > Initial implementation of statfs reply, just returning the filesystem type > and its id. > > * netfs.c: Include and . > (netfs_attempt_statfs): Implement. OK; same is done in ftpfs. What does this not-totally-anymore-but-still-quit

[PATCH] procfs: simple implementation of statfs

2012-12-06 Thread Pino Toscano
Hi, attached there is a small patch for procfs to implement statfs, returning only the two fields we can fill for sure. May I push it? Thanks, -- Pino Toscano From 1b7ad5c5d601b6388f0fc871b4fa42d231c05400 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 6 Dec 2012 17:51:58 +0100 Subject

Re: [PATCH 1/1][Trivial fix] procfs FTBFS because of a missing linker flag.

2012-10-18 Thread Samuel Thibault
Cyril Roelandt, le Thu 18 Oct 2012 22:37:34 +0200, a écrit : > The fix is quite simple: Applied, thanks! Samuel

[PATCH 1/1][Trivial fix] procfs FTBFS because of a missing linker flag.

2012-10-18 Thread Cyril Roelandt
Hello, The procfs translator fails to build on my Debian GNU/Hurd virtual machine: gcc -Wall -g -o procfs procfs.o netfs.o procfs_dir.o process.o proclist.o rootdir.o dircat.o main.o -lnetfs -lps /usr/bin/ld.bfd.real: netfs.o: undefined reference to symbol 'fshelp_access'

Re: [PATCH] procfs: another fix for the process file name in stat/status

2012-09-10 Thread Samuel Thibault
Pino Toscano, le Mon 10 Sep 2012 18:16:44 +0200, a écrit : > Updated patch attached. Applied, thanks! Samuel

Re: [PATCH] procfs: another fix for the process file name in stat/status

2012-09-10 Thread Samuel Thibault
Pino Toscano, le Mon 10 Sep 2012 18:16:44 +0200, a écrit : > Alle lunedì 10 settembre 2012, Samuel Thibault ha scritto: > > Pino Toscano, le Mon 10 Sep 2012 17:31:32 +0200, a écrit : > > > Alle domenica 9 settembre 2012, Samuel Thibault ha scritto: > > > > Pino Toscano, le Fri 07 Sep 2012 20:02:56

Re: [PATCH] procfs: another fix for the process file name in stat/status

2012-09-10 Thread Pino Toscano
i = proc_stat_task_basic_info (ps); thread_basic_info_t thbi = proc_stat_thread_basic_info (ps); + const char *fn = args_filename (proc_stat_args (ps)); /* See proc(5) for more information about the contents of each field for the Linux procfs. */ return asprintf (contents, -

Re: [PATCH] procfs: another fix for the process file name in stat/status

2012-09-10 Thread Samuel Thibault
Pino Toscano, le Mon 10 Sep 2012 17:31:32 +0200, a écrit : > Alle domenica 9 settembre 2012, Samuel Thibault ha scritto: > > Pino Toscano, le Fri 07 Sep 2012 20:02:56 +0200, a écrit : > > > +static int args_filename_length (const char *name) > > > +{ > > > + const char *p = name; > > > + while (*

Re: [PATCH] procfs: another fix for the process file name in stat/status

2012-09-10 Thread Pino Toscano
Alle domenica 9 settembre 2012, Samuel Thibault ha scritto: > Pino Toscano, le Fri 07 Sep 2012 20:02:56 +0200, a écrit : > > +static int args_filename_length (const char *name) > > +{ > > + const char *p = name; > > + while (*p != '\0' && *p != ' ') > > +++p; > > Why not using index(name, '

Re: [PATCH] procfs: another fix for the process file name in stat/status

2012-09-08 Thread Samuel Thibault
Guillem Jover, le Sun 09 Sep 2012 01:22:43 +0200, a écrit : > On Sun, 2012-09-09 at 00:22:11 +0200, Samuel Thibault wrote: > > Pino Toscano, le Fri 07 Sep 2012 20:02:56 +0200, a écrit : > > > +static int args_filename_length (const char *name) > > > +{ > > > + const char *p = name; > > > + while

Re: [PATCH] procfs: another fix for the process file name in stat/status

2012-09-08 Thread Guillem Jover
On Sun, 2012-09-09 at 00:22:11 +0200, Samuel Thibault wrote: > Pino Toscano, le Fri 07 Sep 2012 20:02:56 +0200, a écrit : > > +static int args_filename_length (const char *name) > > +{ > > + const char *p = name; > > + while (*p != '\0' && *p != ' ') > > +++p; > > Why not using index(name, '

Re: [PATCH] procfs: another fix for the process file name in stat/status

2012-09-08 Thread Samuel Thibault
Pino Toscano, le Fri 07 Sep 2012 20:02:56 +0200, a écrit : > +static int args_filename_length (const char *name) > +{ > + const char *p = name; > + while (*p != '\0' && *p != ' ') > +++p; Why not using index(name, ' ') here? > + return p - name; > +} Samuel

[PATCH] procfs: another fix for the process file name in stat/status

2012-09-07 Thread Pino Toscano
Hi, attached there is a new patch for procfs to improve again the file name in stat/status files for PIDs. Basically, it just considers only the first word in case the process name has more (e.g. when it changed its own). Thanks, -- Pino Toscano From ebf2b049ea6963026766763df1697467f5806327

  1   2   >