/* List all files in the filesystem to the system console? */
bool fsutil_list_files;
-/* Dump full contents of filesystem to the system console? */
-bool fsutil_dump_filesys;
-
/* Copies from the "scratch" disk, hdc or hd1:0,
to a file named FILENAME in the filesystem.
The file will be SIZE bytes in length. */
PANIC ("%s: open failed", filename);
/* Do copy. */
- buffer = palloc_get (PAL_ASSERT);
+ buffer = palloc_get_page (PAL_ASSERT);
sector = 0;
while (size > 0)
{
filename, (unsigned long long) size);
size -= chunk_size;
}
- palloc_free (buffer);
+ palloc_free_page (buffer);
file_close (dst);
}
off_t size;
disk_sector_t sector;
- buffer = palloc_get (PAL_ASSERT | PAL_ZERO);
+ buffer = palloc_get_page (PAL_ASSERT | PAL_ZERO);
/* Open source file. */
src = filesys_open (filename);
disk_write (dst, sector++, buffer);
size -= chunk_size;
}
- palloc_free (buffer);
+ palloc_free_page (buffer);
file_close (src);
}
if (fsutil_list_files)
filesys_list ();
-
- if (fsutil_dump_filesys)
- filesys_dump ();
}
/* Prints the contents of file FILENAME to the system console as
file = filesys_open (filename);
if (file == NULL)
PANIC ("%s: open failed", filename);
- buffer = palloc_get (PAL_ASSERT);
+ buffer = palloc_get_page (PAL_ASSERT);
for (;;)
{
off_t n = file_read (file, buffer, PGSIZE);
hex_dump (0, buffer, n, true);
}
- palloc_free (buffer);
+ palloc_free_page (buffer);
file_close (file);
}