aboutsummaryrefslogtreecommitdiff
path: root/tmpfs/tmpfs.c
Commit message (Collapse)AuthorAgeFilesLines
* tmpfs: add --sizePino Toscano2012-09-301-3/+26
| | | | | | | | | | | | | | | | | Add the possibility to specify the size with the --size parameter; this makes tmpfs more usable in fstab or Linuxish mount invocations, since the size in such cases is a mount -o option, which gets translated to a --foo translator argument. The old way (specifying the size as the first argument) is left there; although, if --size is passed then the first argument must be "tmpfs", as it is what is passed by fstab/mount. * tmpfs/tmpfs.c (OPT_SIZE): New macro. (options): Add the "size" option. (parse_opt): Use -1 to indicate when SIZE is not yet set. <OPT_SIZE>: Handle case. <ARGP_KEY_NO_ARGS>: Error out only when SIZE is not set. <ARGP_KEY_ARGS>: Error out when SIZE is set and the argument is not "tmpfs".
* tmpfs: extract size string parsing in an own functionPino Toscano2012-09-301-51/+64
| | | | | * tmpfs/tmpfs.c (parse_opt_size): New function, broken out of ... (parse_opt): ... here. Call it.
* Prevent auto-terminating of tmpfs due to idle.Maksym Planeta2012-04-021-1/+27
| | | | | * tmpfs/tmpfs.c (diskfs_thread_function): New function. (main): Manually detach diskfs demuxer.
* [ftpfs]Samuel Thibault2009-02-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * dir.c (ftpfs_refresh_node): Use st_mtim.tv_sec members instead of st_mtime. Also compare st_mtim.tv_nsec members. [libdiskfs] 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * file-utimes.c (diskfs_S_file_utimes): Use st_atim.tv_sec/ st_mtim.tv_sec members instead of st_atime/st_mtime. Also set st_atim.tv_nsec/st_mtim.tv_nsec members. [libftpconn] 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * unix.c (parse_dir_entry): Use st_mtim.tv_sec instead of st_mtime. Set st_atim.tv_nsec, st_ctim.tv_nsec and st_mtim.tv_nsec to 0. [login] 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * utmp.c (S_login_get_idle_time): Use st_atim.tv_sec and st_atim.tv_nsec members instead of st_atime and st_atime_usec. [tmpfs] 2009-02-02 Samuel Thibault <samuel.thibault@ens-lyon.org> * tmpfs.h (struct disknode): Make atime, mtime and ctime members struct timespec instead of time_t. * tmpfs.c (main): Copy st_atim/st_mtim/st_ctim members from st to diskfs_root_node->dn_stat instead of st_atime/st_mtime/st_ctime. * node.c (diskfs_node_norefs): Copy st_atime/st_mtime/st_ctime members from np->dn_stat to atime/mtime/ctime members of np->dn (diskfs_cached_lookup): Conversely.
* 2005-03-20 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2005-03-201-1/+1
| | | | | * tmpfs.c (parse_opt): Use the right argument for parsing the mode.
* 2002-06-14 Roland McGrath <roland@frob.com>Roland McGrath2002-06-251-1/+10
| | | | | * tmpfs.c (main): If get_privileged_ports fails with EPERM, try to open /servers/default-pager instead.
* 2002-06-08 Roland McGrath <roland@frob.com>Roland McGrath2002-06-111-1/+1
| | | | * tmpfs.c (diskfs_append_args): Use %Ld format for off_t value.
* 2002-05-28 Roland McGrath <roland@frob.com>Roland McGrath2002-05-281-1/+1
| | | | | * dir.c (diskfs_get_directs): u_int -> size_t * tmpfs.c (diskfs_append_args): unsigned -> size_t
* 2002-05-13 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2002-05-131-0/+1
| | | | * tmpfs.c (diskfs_extra_version): New variable.
* 2002-05-03 Roland McGrath <roland@frob.com>Roland McGrath2002-05-081-1/+1
| | | | * tmpfs.c (startup_argp): Use OPTIONS array in initializer.
* 2002-03-23 Roland McGrath <roland@frob.com>Roland McGrath2002-03-241-0/+19
| | | | | * tmpfs.c (parse_opt): Grok % suffix on number to mean percentage of the machine's RAM.
* 2002-03-23 Roland McGrath <roland@frob.com>Roland McGrath2002-03-241-12/+54
| | | | | | | | | | * tmpfs.c (options): New static const variable. Add --mode/-m. (struct option_values): New type. (parse_opt): Use that for VALUES. Grok -m to set VALUES->mode. Grok ARGP_KEY_FINI and free our data structure. (tmpfs_root_mode): New variable, set by -m. (main): If -m was given, use that instead of underlying node's permissions.
* 2002-03-23 Roland McGrath <roland@frob.com>Roland McGrath2002-03-241-2/+4
| | | | * tmpfs.c (main): Don't release REALNODE.
* 2001-04-23 Neal H Walfield <neal@cs.uml.edu>Roland McGrath2001-05-061-1/+1
| | | | | * tmpfs.c (main): Pass diskfs_demuxer to diskfs_spawn_first_thread to conform to new libdiskfs semantics.
* 2001-05-01 Neal H Walfield <neal@cs.uml.edu>Roland McGrath2001-05-021-0/+1
| | | | * tmpfs.c (main): Set diskfs_root_node->dn_stat.st_nlink to 2.
* 2001-04-10 Neal H Walfield <neal@cs.uml.edu>Roland McGrath2001-04-121-4/+4
| | | | | | | * tmpfs.c (diskfs_shortcurt_chrdev): Rename to diskfs_shortcut_chrdev. (diskfs_shortcurt_blkdev): Rename to diskfs_shortcut_blkdev. (diskfs_shortcurt_fifo): Rename to diskfs_shortcut_fifo. (diskfs_shortcurt_ifsock): Rename to diskfs_shortcut_ifsock.
* 2001-02-26 Roland McGrath <roland@frob.com>Roland McGrath2001-02-261-2/+7
| | | | | | * tmpfs.c (main): Don't lock diskfs_root_node after alloc, which already locks it. In root node's mode, clear S_ITRANS bits and set S_IROOT bit.
* 2001-02-25 Roland McGrath <roland@frob.com>Roland McGrath2001-02-261-1/+4
| | | | | * node.c (diskfs_S_file_get_storage_info): New function. * tmpfs.c (diskfs_synchronous): New variable.
* 2000-12-30 Marcus Brinkmann <marcus@gnu.org>Marcus Brinkmann2000-12-301-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * dir.c: Include <stddef.h>, <unistd.h>, <sys/mman.h> (diskfs_get_directs): Cast *data to struct dirent *. * node.c: Include <stddef.h>. (diskfs_alloc_node): Remove unused variables err, st, np. (diskfs_free_node): Use *np->dn, not *dn to calculate used space. (recompute_blocks): Replace DT_DEV with DT_BLK. (diskfs_node_norefs): Likewise. (recompute_blocks): Take address of np->dn_stat for pointer st. (diskfs_cached_lookup): New variable st. (diskfs_cached_lookup): Set st to &np->dn_stat, not &dn->dn_stat. (create_symlink_hook): Fix malloc call and return code check. (read_symlink_hook): Return 0. * tmpfs.c: Include <argp.h>, <string.h>, <inttypes.h>, <argz.h>, <error.h>. (parse_opt): Reverse second and third argument of strtoimax call. * tmpfs.h (struct disknode): Remove blind passenger (unnamed copy of anonymous struct {} reg). Some of the above were also reported by Alexey Dejneka <adejneka@comail.ru>.
* New directory tmpfs, in-core filesystem based on libdiskfsRoland McGrath2000-12-271-0/+288