summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-08-30Add a basic [pid]/stat fileJeremie Koenig
* process.c: Add a basic stat file.
2010-08-30Set the owner of process directories.Jeremie Koenig
* process.c (process_make_node): Use the owner_uid from the procinfo structure to set the owner of the created directory.
2010-08-30Fuse the proclist into the root nodeJeremie Koenig
* dircat.c, dircat.h: New files, merge directories. * Makefile: Add the dircat module. * main.c: Use dircat to merge the proclist into the root directory, instead of having it as a stand-alone one. * procfs.h, procfs.c: Add a "refresh hack" to have the contents of the root directory recreated on each request. * proclist.c (proclist_make_node): Enable the hack in question.
2010-08-30Fetch process information and reject the non-existing onesJeremie Koenig
* process.c, process.h (process_make_node): Make static, include a procinfo structure into the node information. (process_lookup_pid): New function, replaces process_make_node as the outer interface, returns an error for non-existing processes. * proclist.c (proclist_lookup): Convert to the new interface.
2010-08-30Add real process nodesJeremie Koenig
* process.c, process.h: New files, implement a process directory with cmdline and environ files. * Makefile: Add the process module. * proclist.c: Replace stub pid files with the real thing.
2010-08-30More cleanup possibilitiesJeremie Koenig
* procfs.c, procfs.h: Extend the signature of the cleanup_contents callback in the procfs_node_ops structure to include the hook and contents_len. (cleanup_contents_with_free, cleanup_contents_with_vm_deallocate): New functions, can be used as a cleanup_contents callback for simple cases. * procfs_dir.c, procfs_dir.h (procfs_dir_make_node): Update, add a cleanup callback, make sure the cleanup callback is invoked if there is an error. * proclist.c (proclist_make_node), main.c (main): Update to match the new interfaces.
2010-08-30Fix the failure semantics of procfs_make_nodeJeremie Koenig
* procfs.c (procfs_make_node): Invoke the cleanup callback on failure, so that callers don't have to. * procfs.h: Document the change. * procfs_dir.c (procfs_dir_make_node), procfs_file.c (procfs_file_make_node), proclist.c (proclist_make_node): Update to reflect the change.
2010-08-30Add the list of processes as a directoryJeremie Koenig
* proclist.h, proclist.c: New files. * main.c: Add a proclist directory based on them. * Makefile: Include the proclist module.
2010-08-30Implement simple directoriesJeremie Koenig
* procfs_dir.h: New file; declare the procfs_dir_make_node function, based on the procfs_dir_entry structure. * procfs_dir.c: New file; implement simple directories. * Makefile: Add the procfs_dir module. * main.c: Use it.
2010-08-30Add a helper module for simple regular filesJeremie Koenig
* procfs_file.h: New file, declares procfs_file_make_node. * procfs_file.c: New file, implements procfs_file_make_node. * main.c: Use them. * Makefile: Add the procfs_file module.
2010-08-30Basic infrastructureJeremie Koenig
* procfs.h: New file; basic interfaces for procfs nodes. * procfs.c: New file; implement the basic infrastructure. * netfs.c: New file; bridge libnetfs and the procfs interfaces. * main.c: New file; mostly a "Hello, World!" for now. * Makefile: New file; standalone for now.
2010-08-29Merge branch 'upstream' into upstream-mergedSamuel Thibault
2010-08-27RegenerateSamuel Thibault
2010-08-27Merge branch 'upstream' into upstream-mergedSamuel Thibault
2010-08-27Merge branch 'procfs-moved' into upstream-mergedSamuel Thibault
2010-08-27Merge branch 'procfs' into procfs-movedSamuel Thibault
2010-08-27Fix default_pager default_pager_object_set_size parametersSamuel Thibault
As suggested by Sergio Lopez. * serverboot/default_pager.c (S_default_pager_object_set_size): Exchange `seqno' and `reply_to' parameters.
2010-08-27make unblocked reads from external objects return a zeroed page.Sergio Lopez
* serverboot/default_pager.c (struct dstruct): Add boolean_t external field. (default_pager_add): Set ds->external to TRUE or FALSE depending whether the object is external. (default_read): Add external parameter. If no_block(block) returns 1, if external is TRUE, zero fill the page and return PAGER_SUCCESS instead of PAGER_ABSENT. (seqnos_memory_object_data_request): Pass ds->external as additional parameter to default_read.
2010-08-27Fix missing mutex unlock.Sergio Lopez
* serverboot/default_pager.c (pager_read_offset): Properly unlock the mutex before returning NO_BLOCK.
2010-08-21Merge branch 'upstream' into upstream-mergedSamuel Thibault
2010-08-18Implement /proc/mounts as a symlink to /etc/mtabJeremie Koenig
* procfs_nonpid_files.c (procfs_create_mounts): New function. * procfs_dir.c (procfs_fill_root_dir): Call procfs_create_mounts. Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
2010-08-18Set an appropriate st_mode on symlinks.Jeremie Koenig
* procfs_pid_files.c (update_pid_entries): When symlink_target is not NULL, set st_size to the symlink length and st_mode to S_IFLNK | 0777.
2010-08-18update_pid_entries(): fix awkwardly indented uninitialized memory leakJeremie Koenig
* procfs_pid_files.c (update_pid_entries): Replace dynamic allocation of `stat' with automatic allocation. Memset `stat' to 0.
2010-08-18Fix the build system to handle part storesJeremie Koenig
Part stores are used for debian-installer, and they're considered more elegant than kernel partition devices. This patch makes sure they're included in the build unless the user disables them explicitely. * Makeconf: add $(PARTED_LIBS) to static binaries which use libstore_part.a. * configure.in: look for libparted again (see also 7c7a04eb). * libstore/Makefile (store-types): include the 'part' store type when appropriate, remove the previous attempt. Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
2010-08-02Merge branch 'upstream' into upstream-mergedSamuel Thibault
2010-08-02Merge branch 'procfs-moved' into upstream-mergedSamuel Thibault
2010-08-02Merge branch 'procfs' into procfs-movedSamuel Thibault
2010-08-01Merge branch 'upstream' into upstream-mergedSamuel Thibault
2010-08-01Merge branch 'upstream' into upstream-mergedSamuel Thibault
2010-08-01Merge branch 'libpthread-moved' into upstream-mergedSamuel Thibault
2010-08-01Merge branch 'procfs-moved' into upstream-mergedSamuel Thibault
2010-08-01Merge branch 'upstream' into upstream-mergedSamuel Thibault
2010-08-01Merge tag 'upstream/libpthread/20090404' into upstream-mergedSamuel Thibault
2010-08-01Move files to procfs to merge along hurdSamuel Thibault
2010-08-012010-05-31 Samuel Thibault <samuel.thibault@ens-lyon.org>Samuel Thibault
* procfs_nonpid_files.c (procfs_read_nonpid_meminfo): Print swap sizes using %llu.
2010-08-012008-12-12 Samuel Thibault <samuel.thibault@ens-lyon.org>Samuel Thibault
* procfs_nonpid_files.c (procfs_read_nonpid_meminfo): Divide by 1024 value returned by get_swap_size and get_swap_free to get kilobytes.
2010-08-012008-09-02 Madhusudan.C.S <madhusudancs@gmail.com>Madhusudan.C.S
* netfs.c: (netfs_get_dirents): Add call to procfs_dir_entries_remove().
2010-08-012008-08-30 Madhusudan.C.S <madhusudancs@gmail.com>Madhusudan.C.S
* procfs_dir.c: (procfs_dir_create): Assign newly created directory to its pointer in netnode. (procfs_dir_remove): Removed function. (free_entry): New function. (ordered_unlink): Likewise. (delete): Likewise. (sweep): Likewise. (procfs_dir_entries_remove): Likewise. (is_in_pid_list): Removed call to make_dir_invalid (). (procfs_fill_root_dir): struct stat *stat -> struct stat stat. Add Read and Execute permissions to all in stat.st_mode. Set stat.st_nlink to 1. Set stat.st_size to 0. Add struct proc_stat *ps definition. Set struct proc_stat data from _proc_stat_create () function and set stat.st_uid and stat.st_gid from the data in that structure. * procfs_pid_files.c: (update_pid_entries): Add Read permissions to all in stat->st_mode.
2010-08-012008-08-29 Madhusudan.C.S <madhusudancs@gmail.com>Madhusudan.C.S
* AUTHORS: File removed. * COPYING: Likewise. * README: Likewise.
2010-08-012008-08-18 Madhusudan.C.S <madhusudancs@gmail.com>Madhusudan.C.S
* procfs_nonpid_files.c: (procfs_write_nonpid_stat): Changed to procfs_read_nonpid_stat. (procfs_write_nonpid_meminfo): Changed to procfs_read_nonpid_meminfo. (procfs_write_nonpid_loadavg): Changed to procfs_read_nonpid_loadavg. (procfs_write_nonpid_uptime): Changed to procfs_read_nonpid_uptime. (procfs_write_nonpid_version):Changed to procfs_read_nonpid_version. * procfs_pid_files.c: (procfs_write_stat_file): Changed to procfs_read_stat_file. Changed the comment correspondingly from Write to Read. (procfs_write_cmdline_file ): Changed to procfs_read_cmdline_file. Changed the comment correspondingly from Write to Read. (procfs_write_status_file): Changed to procfs_read_status_file. Changed the comment correspondingly from Write to Read. (procfs_write_statm_file): Changed to procfs_read_statm_file. Changed the comment correspondingly from Write to Read. (procfs_write_files_contents): Changed to procfs_read_files_contents. Changed the comment correspondingly from Write to Read. Changed the call to procfs_write_nonpid_stat to procfs_read_nonpid_stat. Changed the call to procfs_write_stat_file to procfs_read_stat_file. Changed the call to procfs_write_cmdline_file to procfs_read_cmdline_file. Changed the call to procfs_write_status_file to procfs_read_status_file. Changed the call to procfs_write_statm_file to procfs_read_statm_file. Changed the call to procfs_write_nonpid_meminfo to procfs_read_nonpid_meminfo. Changed the call to procfs_write_nonpid_loadavg to procfs_read_nonpid_loadavg. Changed the call to procfs_write_nonpid_uptime to procfs_read_nonpid_uptime. Changed the call to procfs_write_nonpid_version to procfs_read_nonpid_version. netfs.c: (netfs_attempt_read): Changed the call from procfs_write_files_contents to procfs_read_files_contents.
2010-08-012008-08-18 Madhusudan.C.S <madhusudancs@gmail.com>Madhusudan.C.S
* procfs_nonpid_files.c: (get_uptime): Changed the parameter type from double to struct timeval. Changed the parameter name from uptime_secs to uptime. Removed uptime variable. Changed timersub to use the passed pointer instead of the local variable. Removed the calculation of uptime_secs. (get_total_times): Changed the parameters type from double to struct timeval. Changed the parameters name from total_user_time_secs to total_user_time and total_system_time_secs to total_system_time. New variables total_user_time_tmp, total_system_time_tmp and tmpval of type struct timeval. Call timerclear to clear the tmp variables. Remove calculation of times in seconds and do the same on struct timeval variables throughout using the timeradd macro. Assign values of temporary local variables to the pointers passed as parameters. (procfs_write_nonpid_stat): Replaced variables that hold time in seconds with struct timeval type variables and jiffy_t type variables. Argument to get_uptime changed from uptime_secs to uptime. Arguments to get_total_times changed from total_user_time_secs to total_user_time and total_system_time_secs to total_system_time. Replace arithematic time subtraction with timersub macro. Convert all the times in struct timeval type variables to jiffy_t type. Changed the type casting for the asprintf arguments to be compatible with jiffy_t type. (procfs_write_nonpid_uptime): Replaced variables that hold time in seconds with struct timeval type variables. Argument to get_uptime changed from uptime_secs to uptime. Arguments to get_total_times changed from total_user_time_secs to total_user_time and total_system_time_secs to total_system_time. Replace arithematic time subtraction with timersub macro. Convert all the times in struct timeval type variables to seconds.
2010-08-012008-08-18 Madhusudan.C.S <madhusudancs@gmail.com>Madhusudan.C.S
* procfs_nonpid_files.c: (procfs_write_nonpid_version): New function. * procfs_pid_files.c: (procfs_write_files_contents): Add a check to find if the read is requested for the version file and corresponding a call to it.
2010-08-012008-08-14 Madhusudan.C.S <madhusudancs@gmail.com>Madhusudan.C.S
* procfs.h: (jiffy_t): New typedef. * procfs_pid.h: "procfs.h" is included. (struct procfs_pid_files): Changed all the occurrences of time_t to jiffy_t. * procfs_pid_files.c: Removed "procfs.h". (adjust_jiffy_time): Changed return type from time_t to jiffy_t. Changed the type of jiffy_time variable from time_t to jiffy_t. (get_live_threads_time): Changed the type of utime and stime from time_t to jiffy_t. (get_stat_data): Changed the type of utime and stime from time_t to jiffy_t.
2010-08-012008-08-14 Madhusudan.C.S <madhusudancs@gmail.com>Madhusudan.C.S
* ChangeLog: New file added to procfs * AUTHORS: New file added to procfs * COPYING: New file added to procfs * README: New file added to procfs * Makefile: New file added to procfs * bootstrap.c: New file added to procfs * netfs.c: New file added to procfs * node.c: New file added to procfs * procfs.c: New file added to procfs * procfs.h: New file added to procfs * procfs_dir.c: New file added to procfs * procfs_nonpid_files.c: New file added to procfs * procfs_pid.h: New file added to procfs * procfs_pid_files.c: New file added to procfs
2010-08-01move file to libpthread/Samuel Thibault
2010-08-01Merge branch 'libpthread' into libpthread-movedSamuel Thibault
2010-08-01Move files to libpthread/ for inclusion along hurdSamuel Thibault
2010-05-19Add pthread_yield functionSamuel Thibault
* pthread/pt-yield.c: New file. * Makefile (SRCS): Add pt-yield.c * Makefile.am (libpthread_a_SOURCES): Add pt-yield.c
2009-10-18Fix pthread_kill(thread, 0)Samuel Thibault
* sysdeps/hurd/pt-kill.c (pthread_kill): Return immediately after checks without calling _hurd_raise_signal if sig is 0.
2009-10-13Fix pthread_cleanup_push old-gcc-style initializerSamuel Thibault
sysdeps/generic/bits/cancelation.h (__pthread_cleanup_push): For better portability to various compilation flags, use standard initializer for struct __pthread_cancelation_handler __handler instead of old-gcc-style.