aboutsummaryrefslogtreecommitdiff
path: root/libftpconn/unix.c
Commit message (Collapse)AuthorAgeFilesLines
* Simplify deallocations.Justus Winter2017-08-051-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | free (NULL) is a nop, therefore it is not necessary to check that first. Simplify the code accordingly. This commit is the result of the following semantic patch: @@ identifier X; @@ -if (X) free (X); +free (X); * console-client/console.c: Simplify accordingly. * console-client/driver.c: Likewise. * console-client/vga.c: Likewise. * ftpfs/dir.c: Likewise. * libftpconn/unix.c: Likewise. * libps/fmt.c: Likewise. * libps/proclist.c: Likewise. * libstore/mvol.c: Likewise. * nfs/ops.c: Likewise. * proc/host.c: Likewise. * sutils/fstab.c: Likewise.
* Replace `bzero' with `memset'Justus Winter2014-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For reference, this patch was created using the following semantic patch, and then manually applying the change in all functions containing nested functions, as those are not supported by Coccinelle. @@ expression A, B; @@ - bzero (A, B) + memset (A, 0, B) * auth/auth.c: Replace `bzero' with `memset'. * boot/boot.c: Likewise. * defpager/defpager.c: Likewise. * exec/exec.c: Likewise. Also, drop `safe_bzero' and just use `hurd_safe_memset' directly. * ext2fs/ext2fs.c: Likewise. * ext2fs/getblk.c: Likewise. * ext2fs/pager.c: Likewise. * fatfs/pager.c: Likewise. * ftpfs/dir.c: Likewise. * ftpfs/netfs.c: Likewise. * isofs/inode.c: Likewise. * isofs/pager.c: Likewise. * libdiskfs/file-getfh.c: Likewise. * libdiskfs/file-statfs.c: Likewise. * libfshelp/fetch-root.c: Likewise. * libfshelp/start-translator.c: Likewise. * libftpconn/create.c: Likewise. * libftpconn/open.c: Likewise. * libftpconn/unix.c: Likewise. * libpipe/pipe.c: Likewise. * libps/procstat.c: Likewise. * libps/spec.c: Likewise. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/ugids.c: Likewise. * libstore/argp.c: Likewise. * libstore/enc.c: Likewise. * libstore/kids.c: Likewise. * libthreads/alpha/thread.c: Likewise. * libtreefs/fsys.c: Likewise. * libtrivfs/file-statfs.c: Likewise. * mach-defpager/default_pager.c: Likewise. * pfinet/glue-include/asm/uaccess.h: Likewise. * pfinet/io-ops.c: Likewise. * pfinet/options.c: Likewise. * pfinet/socket.c: Likewise. * pfinet/timer-emul.c: Likewise. * pflocal/io.c: Likewise. * startup/startup.c: Likewise. * storeio/storeio.c: Likewise. * sutils/fstab.c: Likewise. * usermux/usermux.c: Likewise. * utils/fakeauth.c: Likewise. * utils/frobauth.c: Likewise. * utils/login.c: Likewise. * utils/x.c: Likewise.
* fix common misspellingsJonathan Neuschäfer2011-08-201-1/+1
| | | | | | * Fix spelling with codespell[1] and manually review it. [1] http://git.profusion.mobi/cgit.cgi/lucas/codespell/
* [ftpfs]Samuel Thibault2009-02-021-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 2002-10-19 Roland McGrath <roland@frob.com>Roland McGrath2002-10-191-5/+4
| | | | | * unix.c (ftp_conn_unix_start_get_stats): Pass dirname a copy of NAME instead of the original pointer.
* ftpfs/Marcus Brinkmann2002-04-201-29/+89
| | | | | | | | | | | | | | | | | | | | | | 2002-04-13 Moritz Schulte <moritz@chaosdorf.de> * ftpfs.c: Include <sys/stat.h> (main): Stat the underlying node and initialize the root node's stat information. * dir.c (ftpfs_refresh_node): If refreshing the root node, simply use the old stat information. libftpconn/ 2002-04-13 Moritz Schulte <moritz@chaosdorf.de> * unix.c: Include <libgen.h>. (struct get_stats_state): New member: searched_name. (ftp_conn_unix_start_get_stats): Return EINVAL if trying to list the root node without listing it's content; set searched_name to the dirname. (ftp_conn_unix_cont_get_stats): If searching for the list info of one entry, skip all other entries.
* Add braces to silence gcc warnings.Roland McGrath1998-10-201-16/+19
|
* (ftp_conn_unix_cont_get_stats):Miles Bader1997-08-091-0/+7
| | | | Check for interrupts.
* (ftp_conn_unix_cont_get_stats):Miles Bader1997-08-081-13/+39
| | | | | | | | | | | Pass only directory-relative names to the callback function. (struct ftp_conn_unix_syshooks): Initialize APPEND_NAME and BASENAME fields; remove FIX_NLIST_NAME initialization. (ftp_conn_unix_fix_nlist_name): Function removed. (ftp_conn_unix_append_name, ftp_conn_unix_basename): New functions.
* (ftp_conn_unix_syshooks):Miles Bader1997-08-071-1/+19
| | | | | | Add ftp_conn_unix_fix_nlist_name. (ftp_conn_unix_fix_nlist_name): New function.
* (parse_dir_entry):Miles Bader1997-08-061-2/+0
| | | | Re-enable mktime calls.
* (ftp_conn_unix_cont_get_stats):Miles Bader1997-08-041-0/+4
| | | | If returning with an error, ignore any return from ftp_conn_finish_transfer.
* (ftp_conn_unix_cont_get_stats): Clean up our ftp transfer when we're done.Miles Bader1997-05-141-0/+2
|
* (ftp_conn_unix_cont_get_stats):Miles Bader1997-05-121-27/+80
| | | | | | | | | | | | | | | | | | | Remove any initial `./' we added. Abort CONN if we return an error. (ftp_conn_unix_start_get_stats): Don't use asprintf. Set ADDED_SLASH field. Change FORCE_DIR argument to CONTENTS. Pass -A flag. Prepend ./ to NAME if it doesn't contain a slash. Reject names containg possible meta-characters. (struct get_stats_state): Add ADDED_SLASH field. Add CONTENTS field. (parse_dir_entry): Only set stat->st_fstype if FSTYPE_FTP is defined. Only set stat->st_author if HAVE_STAT_ST_AUTHOR is defined. Only include <hurd/hurd_types.h> if HAVE_HURD_HURD_TYPES_H is defined.
* (struct get_stats_state): Add NAME_LEN & NAME_ALLOCED fields.Miles Bader1997-05-071-28/+30
| | | | | (ftp_conn_unix_cont_get_stats): Retain S's name buffer between entries, only growing it when needed; leave any copying to the client.
* Initial checkin.Miles Bader1997-05-071-0/+599