summaryrefslogtreecommitdiff
path: root/tmpfs/tmpfs.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2000-12-30 19:11:29 +0000
committerMarcus Brinkmann <marcus@gnu.org>2000-12-30 19:11:29 +0000
commitfc97341f492be10f20e4c8a639614e0230d53471 (patch)
tree9a7e96773e4a3ff98615b191cffa77eba963cbc3 /tmpfs/tmpfs.c
parente2fc83f2ce5271d740602b0fa0c1f6681bccb823 (diff)
2000-12-30 Marcus Brinkmann <marcus@gnu.org>
* 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>.
Diffstat (limited to 'tmpfs/tmpfs.c')
-rw-r--r--tmpfs/tmpfs.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/tmpfs/tmpfs.c b/tmpfs/tmpfs.c
index 1df0e04b..caef3861 100644
--- a/tmpfs/tmpfs.c
+++ b/tmpfs/tmpfs.c
@@ -17,6 +17,12 @@ You should have received a copy of the GNU General Public License
along with the GNU Hurd; see the file COPYING. If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
+#include <argp.h>
+#include <argz.h>
+#include <string.h>
+#include <inttypes.h>
+#include <error.h>
+
#include "tmpfs.h"
#include <limits.h>
#include <version.h>
@@ -122,7 +128,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
else
{
char *end = NULL;
- intmax_t size = strtoimax (state->argv[state->next], 0, &end);
+ intmax_t size = strtoimax (state->argv[state->next], &end, 0);
if (end == NULL || end == arg)
{
argp_error (state, "argument must be a number");
@@ -229,8 +235,8 @@ main (int argc, char **argv)
error (0, err, "Cannot get host privileged port");
else
{
- err = vm_set_default_memory_manager (host, &default_pager);
- mach_port_deallocate (mach_task_self (), host);
+ err = vm_set_default_memory_manager (host_priv, &default_pager);
+ mach_port_deallocate (mach_task_self (), host_priv);
if (err)
error (0, err, "Cannot get default pager port");
}