Commit Graph

618 Commits

Author SHA1 Message Date
François Revol
23eafdaf31 [GSoC] [ARM] Patch by Johannes Wischert.
- stubbed out many arch kernel functions (borrowed from other archs),
- partially implement ELF relocations code, enough to load the kernel,
- move uart.c to kernel sources and use the same one for the loader,
- default implementation for gensyscalls,
- assembler code functions for interrupt masking (enable/disable/restore/query).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32327 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-13 18:34:15 +00:00
Stephan Aßmus
bd000a0750 Patch by Jens Arm:
* You have to add "-d" to the bfs_fuse command line to get debug output now,
  in non-debug mode this speeds up operations a lot.
* Errors during initialization and finalization are dumped to the syslog if
  not in debug mode.

Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-27 15:26:23 +00:00
Stephan Aßmus
130e0a69f8 Patch by Jens Arm with cleanup by myself:
Implemented the statfs operation which helps to get
information like used and free blocks on the volume.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31716 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-23 13:47:29 +00:00
Ingo Weinhold
c1dd2f540d Patch by Jens Arm: Fixed swapped arguments in _kern_create_[sym]link()
invocations.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-22 13:50:28 +00:00
Ingo Weinhold
5d0e14e988 Link bfs_fuse against the static host libroot.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31487 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-09 18:06:53 +00:00
Oliver Tappe
16d5c24e53 * merged 32bit-wchar_t branches of buildtools and haiku back into
the respective trunk

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-07 10:30:09 +00:00
Stephan Aßmus
88e5472450 Small coding style fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-05 10:52:38 +00:00
Stephan Aßmus
18128d58dc Patch by Raghuram Nagireddy:
Re-use the kernel emulation of the FS shell to implement a FUSE module
for BFS. In theory, it could use any Haiku file system implementation
just like the FS shell itself, but currently only the BFS code supports
being compiled as an FS shell module. The build target is <build>bfs_fuse
On Ubuntu, you would do this:

sudo apt-get install libfuse-dev
jam \<build\>bfs_fuse
mkdir path/to/moundPoint
path/to/bfs_fuse /dev/sdaX path/to/mountPoint

And that will mount your BFS volume at /dev/sdaX
read/write. As this is new code, you should be careful with your
data and expect potential data loss. Not that I don't trust Raghu's
code, but a warning is always better with such things. So far, my
tests have been successful and it is great to finally have write
support for BFS in Linux! Thanks a lot, Raghu, for your great work!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-05 10:36:30 +00:00
Axel Dörfler
c85220c63a * This fixes my last change...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-30 15:34:08 +00:00
Axel Dörfler
b6fffec7e1 * The fs_shell is now always using BLKGETSIZE64 on Linux, and only if that fails
it will fall back to HDIO_GETGEO.
* This fixes incorrectly reported disk sizes for a number of disks I have here.
  Please open a bug report if this change causes problems for you (we would then
  have to check the kernel version to choose the preferred method).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-30 15:16:50 +00:00
Axel Dörfler
1b5bab63e5 * Fixed warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-26 08:57:36 +00:00
Axel Dörfler
7200c6f499 * Fixed warnings.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-19 10:17:42 +00:00
Axel Dörfler
4ab3fa3b5a * Added real_time_clock(), and real_time_clock_usecs().
* Added support for timespec stat times.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-12 09:31:25 +00:00
Axel Dörfler
0714ea070a * Added "mv" command (BFS only, cannot access the host yet).
* Fixed warning in print_flag().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31009 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-11 18:44:16 +00:00
Jérôme Duval
e7c8829c5d strchr(const char*, ...) returns const char* in C++, identified by gcc 4.4.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-27 20:07:43 +00:00
Michael Lotz
c26b324e20 Should fix GCC4 build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-25 21:26:54 +00:00
Ingo Weinhold
6b5090f2f6 When copying attributes only, it suffices to open the target read-only. Fixes
the image build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-09 12:39:33 +00:00
Axel Dörfler
843ce67e3d * Don't let GuestNode::Init() fail if the attribute directory could not be
opened; not all file systems support this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-07 07:20:57 +00:00
Axel Dörfler
738ed6561d * copy_to_bfs_image is no longer needed (and doesn't compile anymore, either).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-05 17:36:57 +00:00
Oliver Tappe
58481f0f6e * fix gcc4 build of cppunit library by explicitly spelling out std:: in
the headers and importing the required classes in the implementation files
* automatic whitespace cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-02 19:04:52 +00:00
Oliver Tappe
723383c0f4 Applied patch by PulkoMandy, adjusted and extended by myself:
* integrating most of the locale kit into the build (and image)
* removed LocaleBuild.h and _IMPEXP_LOCALE since that does not make
  sense for elf (which usually exports all symbols anyway)
* added a couple of locale kit related pseudo targets for convenience
Hey, some of that stuff already seems to work :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30545 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-01 21:56:16 +00:00
Oliver Tappe
c3ac87e8fc * Copied imported OpenTracker Locale Kit files from the vendor branch
into their new homes (at least for now, might need some adjustment).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-01 19:23:59 +00:00
François Revol
89b87f2ba5 Fix linux build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-29 01:30:53 +00:00
François Revol
f5be3a125f Rename C file; add to the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-27 18:49:42 +00:00
François Revol
5b47f71ccb Move the checksum fixup tool where it belongs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30467 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-27 18:45:28 +00:00
Ingo Weinhold
04eb9ba18e Patch by "VinDuv" (Vincent Duvert?): Added FSShell support for devices on
MacOS X.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-21 10:21:03 +00:00
Ingo Weinhold
81f87f58ed When clearing a device we do now ignore an error when we could write anything
at all.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-13 23:57:12 +00:00
Ingo Weinhold
526d707eb6 Added new build tool create_image which is now used to create and/or clear a
raw image. This fixes the problem that an existing image couldn't be resized.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-12 09:18:18 +00:00
Ingo Weinhold
3cf43c2651 Removed the fs_vnode_ops::create_dir() parameter for returning the ID of the
newly created dir. The VFS really doesn't need it and for some file systems
it might not be easy to get by. Several file systems (e.g. rootfs and fat)
were ignoring the parameter anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29719 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-26 00:16:34 +00:00
Michael Lotz
49004dc730 Remove the additional fs_vnode_ops arugment from get_vnode() again as it's not
needed at all when used as intended. Thanks Ingo for the explanation on how this
is intended to work. Adjusted the overlay fs accordingly and updated/reverted
the changes to the other filesystems.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-19 18:13:01 +00:00
Michael Lotz
4b08e1b9e3 Add the host libsupc++ to generate_attribute_stores.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 17:08:05 +00:00
Michael Lotz
816f925d39 Add generate_attribute_stores to the tools using the Be API so it builds on other platforms as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 12:31:33 +00:00
Michael Lotz
cbaec88839 Add a generate_attribute_stores build tool. It can be used to recursively
generate attribute stores for attribute overlay. This can be used to generate
ISO only Haiku CDs with attribute support in the future. Note that while they
are mostly bootable they aren't really usable yet because of the missing query
support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-14 00:28:35 +00:00
Michael Lotz
00405f2286 * Add an additional argument to get_vnode() that gets the fs_vnode_ops of the
node. That is needed for a layered filesystem to be able to construct a full
  fs_vnode out of a volume/inode pair.
* Adapt places where get_vnode is used. Sadly this is a C API and we can't just
  use a default NULL for that argument.
* Introduce a flag B_VNODE_WANTS_OVERLAY_SUB_NODE that can be returned in the
  flags field of a fs get_vnode call. A filesystem can use this flag to indicate
  that it doesn't support the full set of fs features (attributes, write support)
  and it'd like to have unsupported calls emulated by an overlay sub node.
* Add a perliminary overlay filesystem that emulates file attributes using files
  on a filesystem where attributes aren't supported. It does currently only
  support reading attributes/attribute directories though. All other calls are
  just passed through to the super filesystem.
* Adjust places where a HAS_FS_CALL() is taken as a guarantee that the operation
  is supported. For the overlay filesystem we may later return a B_UNSUPPORTED,
  so make sure that in that case proper fallback options are taken.
* Make the iso9660 filesystem request overlay sub nodes. This can be fine tuned
  later to only trigger where there are features on a CD that need emulation
  at all.

If you happened to know the attribute file format and location you could build
an iso with read-only attribute support now. Note that this won't be enough to
get a bootable iso-only image as the query and index support is yet missing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-09 23:06:31 +00:00
Michael Lotz
3c885c3390 Fix missing inclue.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29014 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-25 18:14:46 +00:00
Axel Dörfler
114d7934a7 * Added "info" command that prints the information of the fs_info structure.
* Shuffled functions around to separate command functions from their support
  functions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-12 12:03:58 +00:00
François Revol
21c478525f Add to the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-12 00:15:50 +00:00
François Revol
098dbd2216 A little tool to hack COFF image to make them edible by oldworld OF (seems BFD forgets to set some fields...), that was mentionned on some NetBSD mailing lists, let's see if it works...
Taken from ftp://mir1.ovh.net/lv0/ftp.kernel.org/pub/scm/linux/kernel/git/jejb/merge-tree/arch/powerpc/boot/hack-coff.c


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-11 23:53:59 +00:00
Axel Dörfler
8f1cb8fca2 * Brought the fs_shell block_cache implementation up to date, and incorporate
the fixes applied to the kernel version of it (most notably a correctly
  working block_cache_discard(), and cache_detach_sub_transaction()).
  Also switched to the new notification functions, even though it still works
  synchronously in the fs_shell.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-11 22:19:46 +00:00
Axel Dörfler
5b812019b4 * Added function block_cache_discard() that flushes blocks from the block cache,
discarding their changes. This functionality currently only works correctly
  when no transactions are used.
* Started test application for the block cache, doesn't do anything yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-04 14:49:33 +00:00
Ingo Weinhold
210553573f Patch by Artur Wyszynski: Added support for partitions in Darwin.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-31 15:56:33 +00:00
Axel Dörfler
500d847a1d * Enlarged the arbitrary maximum image size to 4 GB which still works just
fine.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-24 11:14:49 +00:00
Ingo Weinhold
bc3955fea5 Preparations for removing __BEOS__ from the compiler defines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-23 21:46:26 +00:00
Jérôme Duval
4dafc175e9 takes into account the offset used in realpath(). see bug #2895. Thanks kaliber!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-20 21:41:30 +00:00
Axel Dörfler
c709ef9805 * Changed how the string for the UUID hash is build.
* Accidently did not start at different positions in the string to build the
  hash, but just added some value to the hash...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 22:30:43 +00:00
Michael Lotz
4977d0be6c Fix build under BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 21:47:05 +00:00
François Revol
b20c4dc559 This should fix the BeOS build. Note BeOS had read_pos() way before POSIX had any pread()...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 19:51:52 +00:00
Axel Dörfler
700de23e38 * Added assigning an UUID to the image written; you can either pass one via the
new '-u' option, or let it generate one automatically (by building a hash over
  the full path of the image).
* This is allows you to use our images in VirtualBox without having to readd
  the hard drive with every rebuild.
* Enlarged the description section to 1024 bytes - this also prevents VirtualBox
  from writing data beyond the description size.
* Added '-d' option to just dump info about an existing vmdk image file (only
  monolithic mode is supported, though).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28093 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-14 17:14:29 +00:00
Rene Gollent
dfcc059e7b Fix build of tool version of makebootable on Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28062 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-13 23:27:50 +00:00
Karsten Heimrich
8e0559b5f7 * fix probable memory leaks, not in the image but anyway...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-03 11:54:05 +00:00
Ingo Weinhold
8df6a8dbf5 * Moved strace sourced to src/bin/debug/.
* Factored a few functions out of strace that can be reused.
* Added the beginnings of a "profile" command. It is very much work in
  progress, though it is already able to profile the main thread of a
  program.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-15 13:45:43 +00:00
Ingo Weinhold
034fb25c4d * The image was create one byte too short. Fixes #2722.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 10:04:51 +00:00
Ingo Weinhold
ee1a1571a2 Implemented a simple directory entry cache to speed up path resolution.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-08 05:08:37 +00:00
Ingo Weinhold
b0b6878c97 <sys/ioctl.h> also seems to be the standard Linux place for the
ioctl() prototype. Apparently some Linuxes discarded the <stropts.h>
header which POSIX demands.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-03 00:39:45 +00:00
Stefano Ceccherini
7c30291e7e fix the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-01 06:55:22 +00:00
Ingo Weinhold
fbed358934 The incorrect indentation fooled me. <stropts.h> is already included in
Linux.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-31 12:35:12 +00:00
Ingo Weinhold
3d62be2e79 Not so in BeOS/Haiku, but officially ioctl() is defined in <stropts.h>.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-31 12:30:23 +00:00
Ingo Weinhold
4612433715 * Added parameter "size_t align" to file_map_translate(). If > 1, the
vector at the end of the file will be aligned to the given value.
* BFS uses an alignment of 512 bytes (should be block size of the
  underlying device or BFS block size, whatever is less), which should
  be fine, since file data are only stored in BFS blocks. This totally
  avoids any partial operations at the I/O scheduler level, thus saving
  disk operations. Not that I could measure any performance difference.
  Theoretically it should help a lot though, particularly when dealing
  with lots of small files, since we avoid using bounce buffers, which
  are (a) limited in number and (b) require copying of the data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-30 23:06:28 +00:00
Stephan Aßmus
ec56835f51 Patch by David Powell:
* Implement color palette generation for the boot splash images in the
  generate_boot_screen build tool. Only 4-bit screen support is missing now.
* Adopted images.h with the new results from generate_boot_screen.

This should fix black boot screens for graphics cards that don't support
true color modes for the native resolution. I've tried to find the ticket,
#2177 almost looks like the one, but it looks more like the mode is out
of range if I understand the ticket right.

Thanks a lot, David, and sorry it took so very long to apply your patch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 16:59:34 +00:00
Ingo Weinhold
4d121ec067 Patch by Andreas Faerber with changes by myself: Work towards Solaris
build platform support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-09 15:36:24 +00:00
Stefano Ceccherini
03c9250f85 gcc4 build fix
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 08:33:40 +00:00
Axel Dörfler
3c1a3047a4 * Added file_cache_is_enabled() function.
* Added file_map_set_mode() function that you can use to keep a whole file
  cached. This is needed for the swap file support: FILE_MAP_CACHE_ALL will
  not only precache all file_io_vecs when called, but it will also cause all
  file_map_translate() calls to fail that would require further caching (ie.
  if the file size had changed).
* Updated the fs_shell file map code to the latest one (with several bug fixes).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 08:28:17 +00:00
Ingo Weinhold
7491000f20 Added functions file_cache_{disable,enable}(). They allow to disable
actual caching in the file cache, i.e. all reads and writes go directly
to the underlying device. The implementation is not quite complete,
since the VM can still add pages to the cache when the file is mmap()ed,
which can lead to inconsistencies.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26779 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-04 03:15:50 +00:00
Axel Dörfler
9f6ae76f02 * Added acquire_vnode() call that you can use to get another reference to an
inode - unlike get_vnode() the busy flag won't prevent you from getting that
  reference.
* Changed put_vnode() to return an error in case the vnode couldn't be found.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-01 09:59:19 +00:00
Ingo Weinhold
7e3c202478 Added fssh_volume_for_vnode() and fssh_do[_iterative]_fd_io() to the
FS shell. The latter two lack an implementation yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-28 23:36:08 +00:00
Maurice Kalinowski
39fd631a39 julun+mauricek:
* as on darwin platform we cannot use resources for the boot sector data. Instead use attributes to store the data.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26589 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 22:17:54 +00:00
Maurice Kalinowski
ea70c8b6f3 julun+mauricek:
* additional includes for cygwin
   * some automatic whitespace cleanup

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 22:15:05 +00:00
Maurice Kalinowski
dff0e735eb julun+mauricek:
* Cygwin does not have regex support, so we use the one we already have in our glibc.
   * Keymap.h has a automatic forward declaration of re_registers, which causes a compile break on Cygwin, but not on other platforms. So add a include for regex.h in the header and remove it in the source file.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 21:40:12 +00:00
Ingo Weinhold
e6bd90c58d * bfs_fsync() was the only place which could cause the
fs_vnode_ops::write_pages() to be called with fsReenter = true. Since
  this is no longer the case, the argument has become superfluous. For
  read_pages() it always was. Removed the argument from the functions
  and all functions that propagated it.
* Some whitespace at the end of lines was removed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26579 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-23 15:47:47 +00:00
Axel Dörfler
78b32dd026 * The rw_lock is now able to nest read/write locks when you have a write lock.
It follows the semantics of the BFS R/W lock, though, that is, if you unlock
  your write lock before the read locks, the read locks effectively become
  write locks, too.
* Added a mutex_transfer_lock() function that will allow you to unlock a mutex
  in a different thread than the one which locked it (only matters if KDEBUG
  is enabled, though).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26316 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-08 07:56:49 +00:00
Axel Dörfler
06d5e1b3b6 * Added ReadLocker/WriteLocker classes to auto lock an rw_lock.
* Added *_init_etc() functions to the fs_shell.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 18:12:33 +00:00
Axel Dörfler
af370c702a * Added a recursive_lock_trylock() function.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26297 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 16:17:34 +00:00
Axel Dörfler
589f1a9133 * Made the private kernel locking primitives available to file systems as well.
* Applied Korli's mutex_unlock() fix to block_cache.cpp.
* Removed block_cache_priv.h, as it's no longer needed (moved its definitions
  into block_cache.cpp, as in the kernel file).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 15:19:19 +00:00
Philippe Houdoin
e221c09e50 Moved rc from <build> tools to target standard command tools.
Updated rules to build the <build>rc platform version.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-27 20:44:01 +00:00
François Revol
14fbb88f10 stubbed out makebootable for atari. It should be doable the same way as on x86, but the emulator doesn't scan hdds for bootsector.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-23 15:52:44 +00:00
Michael Lotz
b204648b75 Don't define UNIX when building zip as a build tool under a BeOS compatible
host. This prevents the BeOS and Unix specific zipup.h from clashing and allows
hybrid GCC2/GCC4 images to be built under BeOS.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-31 18:07:07 +00:00
Ingo Weinhold
2ed64c408d Patch by Michael Lotz fixing a missing typedef when compiling with
native compiler gcc 2 and cross-compiler gcc 4.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-31 16:39:56 +00:00
Ingo Weinhold
42d3fc045e Added implementations for the __fssh_swap_int*() functions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-29 20:52:43 +00:00
Rene Gollent
585080d740 Corrected with input from Ingo. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 00:35:33 +00:00
Rene Gollent
aa9d957d57 FreeBSD build fix, please review (needed for definition of FSSH_SEEK_CUR).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-27 23:02:06 +00:00
Ingo Weinhold
a55e32e52d * Moved fssh_lseek() out of the FSShell namespace.
* Removed debug left-over.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-27 13:28:58 +00:00
Ingo Weinhold
adfd232086 Allow building zip as build tool. Tested under Linux only.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-17 23:29:01 +00:00
Ingo Weinhold
6b202f4e3d * Introduced new header directory headers/private/system which is supposed
to contain headers shared by kernel and userland (mainly libroot).
* Moved quite a few private kernel headers to the new location. Split
  several kernel headers into a shared part and one that is still kernel
  private. Adjusted all affected Jamfiles and source in the standard x86
  build accordingly. The build for other architectures and for test code
  may be broken.
* Quite a bit of userland code still includes private kernel headers.
  Mostly those are <util/*> headers. The ones that aren't strictly
  kernel-only should be moved to some other place (maybe
  headers/private/shared/util).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 03:55:16 +00:00
Ingo Weinhold
2988eab3dc Added support for option '-L' (always dereference symbolic links).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-01 12:43:29 +00:00
François Revol
99734c6841 Missing close() calls just for the sake of it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-26 19:35:00 +00:00
Stephan Aßmus
636bff2fd2 Patch by Philippe Saint-Pierre:
* Revised the RLE algorithm used for compressing the boot splash artwork to
  handle uncompressed runs.
* Compress the RGB channels separately for improved efficiency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 20:10:50 +00:00
Ingo Weinhold
ea39c6377e Might help gcc 2.95.3 to resolve its perceived overloading of the
function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24824 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 03:13:11 +00:00
Ingo Weinhold
7ffafac8d7 * Reorganized the FS interface a little:
- Moved most file_system_module_info hooks into separate structures.
    Those that operate on mounted volumes to fs_volume_ops, those
    operating on a vnode to fs_vnode_ops.
  - Got rid of the fs_volume, fs_cookie, fs_vnode typedefs. We use void*
    again.
  - Instead of a void* volume and node cookie hooks are passed a
    fs_volume and fs_vnode structure pointer, which contain the cookie
    and an ops pointer (fs_volume a few more things).
  - The VFS {new,publish,get,...}_vnode() functions take a fs_volume*
    instead of the volume ID. So does vfs_get_fs_node_from_path().
  - Added type and flags arguments to publish_vnode() and the
    get_vnode() hook and removed the type argument from lookup() hook.
    Added vnode::type using formerly unused bits to store the node type.
    Simplified a few things in the VFS due to the now always available
    node type.
  - Added fs_volume_ops::{create,delete}_sub_vnode() and
    fs_vnode_ops::get_super_vnode() hooks. They are used to support file
    system layers, e.g. allowing to extend an FS not supporting BeOS
    attribute with attribute support. Needs some more work in the VFS.
  - Added fs_vnode_ops::create_special_node() hook for creating special
    nodes (e.g. FIFOs).
* Adjusted the built-in file systems and BFS according to the interface
  changes. Removed all other FSs from the image for the time being.
  We'll see whether further API changes are necessary before porting
  them.
* Adjusted the bfs_shell accordingly.
* Implemented create_special_node() in rootfs to support special nodes.
* Added support for FIFOs:
  - Added syscall _kern_create_fifo() (used by mkfifo()), which creates
    a special node (type S_IFIFO) in the respective file system.
  - When a special node is published the VFS creates a respective sub
    node. Currently only FIFOs are supported.
  - Added a little support for FIFO subnodes by using functionality from
    the pipefs.
  - Added mkfifo to the image. It can create FIFOs in the rootfs, but
    the FIFOs aren't really usable ATM, since they still work like
    pipes, i.e. readers and writers need to have them open at the same
    time.
* Some smaller changes in the VFS:
  - Made the *_CALL macros nicer to use (vargs).
  - Refactored FS entry lookup into new function lookup_dir_entry().
  - create_vnode() no longer just calls the FS create() hook. First it
    looks up the entry and uses open_vnode(), if it already exists. This
    is necessary for two reasons: 1) The FS might not support create()
    while still allowing to open() entries. 2) When the FS has other
    layers on to of it (or the respective node) it might not be
    responsible for opening the node.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 23:05:16 +00:00
Stephan Aßmus
d0fc7c65c6 Patch by Philippe Saint-Pierre:
* Implemented RLE compression for the boot splash images, resulting in
  smaller kernel and boot loader.
* Only the boot loader contains the RLE compressed images, the decompressed
  buffer for the icons is passed to  the kernel via kernel args.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 21:15:43 +00:00
Ingo Weinhold
9181e9cbcf * Used the original size for vmdk Extent Description, not the
sector-aligned one.
* Truncated the image a little too short.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 01:24:26 +00:00
Ingo Weinhold
702421fa41 Fixed incorrect getopt() specification: -c and -H don't have arguments.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 23:54:55 +00:00
Ingo Weinhold
7c529c2415 * Renamed vmdkheader to vmdkimage and changed it to create a full image
by default (new option "-H" will create the header only). Option "-c"
  will clear the image.
* Adjusted build_haiku_image accordingly. vmdkimage is way faster and
  more portable than the former vmdkheader+dd combo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 21:18:18 +00:00
Axel Dörfler
e63c117011 Looks like some bloke forgot to commit *some* files that should have been part
of r24768 (block cache notification mechanism rewrite).
Thanks for the note, Vasilis!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 14:14:27 +00:00
Stephan Aßmus
f408d9a227 * Renamed placement constants to fit into the existing scheme.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 10:23:03 +00:00
Stephan Aßmus
a6e227c551 * Changed the generate_boot_screen build tool to take placement parameters
for the logo and the icons separately.
* Image data output uses full line width.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24766 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 10:19:00 +00:00
Ingo Weinhold
f9bf1195b8 Use a reasonable umask when creating directories.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-02 12:29:59 +00:00
Ingo Weinhold
fb84047190 Null-terminate the _kern_read_link() result.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 04:18:40 +00:00
Ingo Weinhold
baba54f94f Added options -x and -X to the "cp" command, used to specify exclude
patterns for file respectively path names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 04:06:49 +00:00
Ingo Weinhold
b71cab0178 Added the options -x and -X to copyattr. They can be used to specify an
exclude pattern for file respectively path names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-26 04:05:25 +00:00
Axel Dörfler
5e2ef462ec * Got rid of the duality of FS_WRITE_STAT_* vs. B_STAT_* flags (removed
the former ones).
* Removed extraneous white space.
* net_server settings are now also updated when the size of the 
  file changed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-24 12:04:47 +00:00
Ingo Weinhold
0ba49c35b3 * BuildPlatformMain supports overriding HOST_LIBROOT on the target now,
so one can set it to the static libroot, if desired.
* Generic attribute emulation:
  - Added build tool rm_attrs, a simple "rm" replacement, which also
    removes the attributes directory for a given file.
  - Added build/scripts/rm_attrs shell script, which wraps the
    invocation of the rm_attrs tool. If it doesn't exist yet, the
    ordinary rm is used.
  - The RM jam variable refers to the rm_attrs script now, i.e. whenever
    something is removed by the build system, the attributes are removed
    too (if the build tool has already been built, that is).
  - Removed the shell function attrrmrf() in build_haiku_image. We use
    the rm_attrs tool instead, if necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-22 21:05:03 +00:00
Ingo Weinhold
c852f04a83 "rm" was leaking the dir FD when failing to read from the dir.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-20 13:34:23 +00:00
Stephan Aßmus
55ef60a5ae * Removed the Copyright image/rendering.
* Fixed the icons image, it was upside down.
* Support the new 24 bit boot screen images in the boot_loader and the kernel.
* Prepare the code for future indexed versions of the boot screen images.
  But the generate_boot_screen tool currently does not generate those.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 20:27:47 +00:00
Stephan Aßmus
a3636f92c0 * Removed almost all global variables.
* Release the resources needed for reading the PNGs and storing the image data.
* Change the semantics of the tool, previously it only supported palette mode
  PNGs. Now I am doing the opposite, the tool tries to set up the PNG lib to
  hand out RGB data, even stripping a potential alpha channel.
* Used standard Haiku license header.
* Improved output syntax.
* No longer depends on input image names, even with paths. The generated
  output needs to have fixed names, or else the other source code will break.
* Made the use of the setjmp feature optional, depending on the PNG lib version
  in use. This makes it possible to build the tool on BeOS without updating
  the installed PNG lib.
* Added a few TODOs. Most important is to generate a single palette for all
  three images, and storing the images in their palette representation along
  with the full quality versions, so that they are ready during boot without
  sucking up too many CPU cycles.

NOTE: The header which is now generated is not usable by the rest of the
source code yet, but that will come later. generate_boot_screen is not
integrated yet anyways.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 18:15:58 +00:00
Ingo Weinhold
2ca4cee18f * Renamed hbsg to generate_boot_screen and moved it to src/tools.
* Build generate_boot_screen as a build platform tool. It requires
  libpng to be installed.
* Added output file name as fourth argument.
* Replaced unnecessarily complicated
  fwrite(<string>, strlen(<string>),...) and sprintf()+fwrite()
  constructs by fputs() and fprintf() respectively.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 14:06:57 +00:00
Stephan Aßmus
c09ac5cf13 patch by Artur Wyszynski (aljen):
Build fix for Darwin host platform.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 10:10:50 +00:00
Ingo Weinhold
1149e982f0 Left over debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-11 17:00:55 +00:00
Ingo Weinhold
45eb999ec8 Added "query" and "chmod" (octal, non-recursive only) commands.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-09 17:41:42 +00:00
Ingo Weinhold
0006905bfb Added "--ignore-attributes" switch to the "cp" command.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-09 17:40:04 +00:00
Axel Dörfler
fa28330bbf * Explained under which circumstances vnode_path_to_vnode() will clobber the
buffer of the provided "path" argument.
* Applied patch by Vasilis to fix some warnings when build on Linux (missing
  const on certain functions). We should probably fix the original
  {add|remove}_debugger_command() functions in Haiku as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-09 13:43:38 +00:00
Axel Dörfler
9c800a96c0 This should fix the build under Dano/Zeta again, at least it works here:
* added HaikuBuildCompatibility.h to the src/build/* files that are built as
  part of the tools we need to build Haiku.
* Changed HaikuBuildCompatibility.h so that it does not define the things
  that are already in the build headers.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-27 09:03:46 +00:00
Ingo Weinhold
3f6971fd68 Some additions to the existing kludges to fix the build on BeOS.
I tested building libroot.so only (BeOS under VMware is not exactly
fun as a build platform), but I think that should suffice.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-26 02:31:59 +00:00
Ingo Weinhold
cbd4dd196d Patch by Vasilis Kaoutsis: Added missing headers. Fixes the build on
certain Linux distributions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-25 02:00:12 +00:00
Ingo Weinhold
da51719239 Patch by Samuel Rodriguez Perez:
Fixed building Haiku images on FreeBSD, which was broken since the
introduction of the device support.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-25 01:01:41 +00:00
Stephan Aßmus
50baebaf5f * Fixed warnings.
* Truncated lines to 80 char width.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-23 10:00:52 +00:00
Ingo Weinhold
5d06d46935 Removed debugging leftover.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-17 18:07:25 +00:00
François Revol
32d33c44e5 Fix build on BeOS host, seems it was trying to instanciate a struct stat instead...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-17 17:53:54 +00:00
Ingo Weinhold
3e61704042 axeld + bonefish:
Added parameters --start-offset and --end-offset to restrict the
access of the file system to only that part of the given file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23970 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-17 13:42:27 +00:00
Michael Lotz
d9b0e6addd Two very small changes that help compiling Haiku under Haiku.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-12 00:54:04 +00:00
Ingo Weinhold
ed854de770 Also include info about the syscall return type in the
extended_syscall_info structure.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-07 16:03:00 +00:00
Ingo Weinhold
80b2da5e53 Patch by Samuel Rodriguez Perez: Added support for writing Haiku
directly onto a device under FreeBSD.

I messed around with the code a little (style-fixes, some refactoring)
without being able to compile or test it, so be careful...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-05 20:54:42 +00:00
Ingo Weinhold
b4f58d8758 Renamed syscall_parameters_info structure to extended_syscall_info (and
kSyscallParametersInfos to kExtendedSyscallInfos) and added "name"
field. Now the classes for syscall kernel tracing don't need to lookup
the syscall function symbol anymore, which speeds up printing/filtering
of those entries dramatically.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-21 15:29:00 +00:00
Ingo Weinhold
19101ba0f4 Generate a kernel array kSyscallParametersInfos containing information
about syscall parameters. Particularly interesting is a type_code field
for each parameter. The mechanism isn't very accurate, but we can
classify everything in string, pointer, and integer types.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-18 19:25:28 +00:00
Jérôme Duval
bbaaf4b7c3 gcc4 requires a cast, so we prepend (void *) to cast every syscall function
fixed syscall.cpp inclusions due to renaming


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-18 17:39:43 +00:00
Axel Dörfler
5d0afa4e4e * cache_detach_sub_transaction() didn't really work: it did not put all needed
blocks into the new transaction, but it would set that transaction on all
  blocks of the old transaction, too. Also, it did not correctly update the
  num_blocks/sub_num_blocks fields of the old transaction. Even worse, it did
  return B_OK instead of the ID of the new transaction...
* get_writable_cached_block() did not correctly maintain the number of blocks
  in the sub transaction.
* write_cached_block() did not free the original_data of a block when it wrote
  it back as part of a previous transaction.
* Changed "cookie" for cache_next_block_in_transaction() to "long", so it will
  be 64 bits when needed.
* Improved the API for detaching sub transactions: you can now get the blocks
  of only the main (parent) transaction as well, added new
  cache_block_in_main_transaction() function.
* BFS now flushes the log when there is no space left for the current
  transaction.
* _WriteTransactionToLog() allocated a "vecs" array, but never freed it.
* _WriteTransactionToLog() now also supports detaching the current sub
  transaction if the whole thing is getting too large (it will now also panic
  if that doesn't work out).
* Removed a useless optimization: making the blocks available in the cache
  isn't really needed, as all blocks in a transaction are locked into the
  cache, anyway.
* Implemented Transaction::WriteBlocks().
* Minor cleanup, removed some dead code, fixed warnings in the fs_shell's
  block_cache when compiled with debug output on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-18 17:07:18 +00:00
Axel Dörfler
4fc4f2c8ae * Added a transaction listener mechanism to be notified when a
transaction ends or has been aborted.
* BFS now listens for transactions when it created an inode to see if 
  the transaction will be aborted without freeing the inode (in which 
  case it will panic for now).
* Started implementing tracing support, but it's not working yet.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 17:18:29 +00:00
Axel Dörfler
7f2453fa9c Added a progress monitor when copying large files (ie. over 1 MB).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23457 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-12 23:53:09 +00:00
Ingo Weinhold
34b3b26b3b Merged branch haiku/branches/developer/bonefish/optimization revision
23139 into trunk, with roughly the following changes (for details svn
log the branch):
* The int 99 syscall handler is now fully in assembly.
* Added a sysenter/sysexit handler and use it on Pentiums that support
  it (via commpage).
* Got rid of i386_handle_trap(). A bit of functionality was moved into
  the assembly handler which now uses a jump table to call C functions
  handling the respective interrupt.
* Some optimizations to get user debugger support code out of the
  interrupt handling path.
* Introduced a thread::flags fields which allows to skip handling of
  rare events (signals, user debug enabling/disabling) on the
  common interrupt handling path.
* Got rid of the explicit iframe stack. The iframes can still be
  retrieved by iterating through the stack frames.
* Made the commpage an architecture independent feature. It's used for
  the real time data stuff (instead of creating a separate area).
* The x86 CPU modules can now provide processor optimized versions for
  common functions (currently memcpy() only). They are used in the
  kernel and are provided to the userland via commpage entries.
* Introduced build system feature allowing easy use of C structure
  member offsets in assembly code.

Changes after merging:
* Fixed merge conflict in src/system/kernel/arch/x86/arch_debug.cpp
  (caused by refactoring and introduction of "call" debugger command).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 00:36:44 +00:00
Axel Dörfler
4accd841c7 * Fixed a big bug in common_file_io_vec_pages(): vecOffset was not correctly
set when the first chunk of the file could be read in directly, causing it
  to read data to a wrong place in the buffer.
* Reading in the first chunk directly would have also only worked if vecIndex
  and vecOffset was 0 when calling the function.
* Applied the fs_shell changes in file_map to the kernel version as well (the
  constructor already worked correctly, though).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-06 14:04:15 +00:00
Axel Dörfler
87aa1668c9 * The file_map constructor would not set the size of the file_map object,
causing all reads with an offset unequal to 0 to fail.
* Also fixed file_map_translate() which was hiding this problem.
* Fixed build and warnings when compiled with debugging output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-06 13:21:00 +00:00
Jérôme Duval
a5d8db5d76 fix linux build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-08 14:40:33 +00:00
Axel Dörfler
21885de266 * BFS now always writes back the whole block when it writes the super block.
* Therefore, I've added an I/O control that let's it update the boot block
  part of this block, so that makebootable can use it on a mounted volume
  (this will probably be moved into a disk system API later).
* Added user_memcpy() to the fs_shell.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-08 14:23:35 +00:00
Axel Dörfler
d3a580d2e0 The fs_shell now also works with devices that don't return a correct
hd_geometry, but do support the BLKGETSIZE64 ioctl (it just crashed 
before).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-05 18:33:58 +00:00
Axel Dörfler
d0007186e5 The fs_shell cache implementation had the same problem as our real cache
until r22998 - but since this was the only implementation, its consequences
were much more likely.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23000 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-26 16:02:10 +00:00
Axel Dörfler
ddd1769901 The file map code isn't that smart yet...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-13 11:20:17 +00:00
Axel Dörfler
4a31d30e84 * The file map needs to know the actual file size to be able to know if it has
the complete extent info or not.
* file_map_translate() now cuts down the request to the file bounds.
* Adjusted BFS and FAT to the API changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22913 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-13 10:34:48 +00:00
Axel Dörfler
c98d35dc33 This might help with the build on Linux.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 21:46:57 +00:00
Axel Dörfler
3d268eda3d * Extracted file_map API out of the file cache - it's now an optional service
that can be used by file systems.
* Changed the way the file cache works: instead of reading/writing to the
  underlying device directly, it can now be used for any data source, ie.
  also network file systems.
* As a result, the former pages_io() moved to the VFS layer, and can now be
  called by a file system via {read|write}_file_io_vec_pages() (naming
  suggestions are always welcomed :-)). It now gets an FD, and uses that to
  communicate with the device (via its fs_{read|write}_pages() hooks).
* The file_cache_{read|write}() functions must now be called without holding
  an I/O relevant file system lock. That allows the file cache to prepare the
  pages without colliding with the page writer, IOW the "mayBlock" flag can
  go into the attic again (yay!).
* This also results in a much better performance when the system does I/O and
  is low on memory, as the page writer can now finally write back some pages,
  and that even without maxing out the CPU :)
* The API changes put slightly more burden on the fs_{read|write}_pages()
  hooks, but in combination with the file_map it's still pretty straight
  forward. It just will have to dispatch the call to the underlying device
  directly, usually it will just call its fs_{read|write}_pages() hooks
  via the above mentioned calls.
* Ported BFS and FAT to the new API, the latter has not been tested, though.
* Also ported the API changes to the fs_shell. I also completely removed its
  file cache level page handling - the downside is that device access is no
  longer cached (ie. depends on the host OS now), the upside is that the code
  is greatly simplified.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 21:19:52 +00:00
Ingo Weinhold
57225f0367 * Moved helper function to check initialization parameters to separate
source file. Added function to check the volume name.
* Removed bfs_validate_initialize(). This functionality is to be implemented
  in a userland add-on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-10 17:33:47 +00:00
Ingo Weinhold
a2db5acb28 At least one file is C++, so we have to link against the C++ runtime.
Should fix the build on Darwin.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22774 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-30 17:18:59 +00:00
François Revol
df05c21550 Default code for m68k.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-23 23:31:01 +00:00
Ingo Weinhold
db5c68ca46 * Added the partition size as parameter to the file and partitioning
system initialize() hooks. It's often the only info about the
  partition one needs and thus locking the partition just to get it is
  no longer necessary.
* intel partitioning system:
  - Removed passing around block sizes. We require 512 byte sectors
    anyway. In fact using the parent partition's block size was even
    wrong.
  - Simplified writing the partition map sector.
  - Simplified and corrected the partition map initialization.
  - We don't fail identifying a partition anymore, if the partition map
    contains no partitions. We would never identify a freshly
    initialized partition map before.
  - Made pm_identify() more intelligent: It determines the priority to
    return depending on whether the partition is the device itself and
    whether we have recognized child partitions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 23:48:18 +00:00
Jérôme Duval
ff386118f4 removed former haiku_book and headersampler tool
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 22:15:58 +00:00
Ingo Weinhold
8c8f8c8420 Added scan_partition() function which can be used by disk systems (e.g.
in *_initialize()) to save some work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 18:03:24 +00:00
Ingo Weinhold
6f05787478 * rootfs.c -> rootfs.cpp
* Made the kernel rootfs reusable by the FS Shell and removed the
  copy in the FS Shell sources.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22436 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 14:30:50 +00:00
Axel Dörfler
417f276c05 Forgot to commit the fs_shell with r22434, thanks for the note, Stefano!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 13:23:00 +00:00
Ingo Weinhold
32bf31b3ee Stricter limit for the number of unused vnodes. The fs_shell doesn't
really manage memory, so one could easily run out of memory when copying
large files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22256 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-19 20:14:50 +00:00
Ingo Weinhold
363d1373f4 We need to use _kern_open() on BeOS incompatible systems, if we want
to be able to open symlinks.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22182 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 18:16:32 +00:00
Ingo Weinhold
fd51b44e2d * HostSymLink::fPath wasn't set to NULL by the constructor, which could
cause a segfault if Init() failed early.
* The -d (don't dereference symlinks) option of cp shall only take
  effect on the top level. When descending into directories, symlinks
  shall never be dereferenced.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 03:06:04 +00:00
Ingo Weinhold
d249fa1b2c Map the fssh_*stat() functions to _kern_read_stat() in libroot_build on
BeOS incompatible platforms. Thus *stat()ing symlinks works.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22178 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 03:01:41 +00:00
Ingo Weinhold
35f57d15ff Support for compiling unzip as a build tool.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 19:04:48 +00:00
Ingo Weinhold
76a8ec23db * Added disk system flags for whether a partition name and partition
content name are supported.
* Added file_system_module_info::flags (analogously to
  partition_module_info::flags) which indicate which disk device
  features the FS supports.
* Replaced the
  file_system_module_info/partition_module_info::supports_*()
  hooks by a get_supported_operations() hook and for partitioning
  systems additionally a get_supported_child_operations() hook.
* Updated file and partitioning systems accordingly.
* Updated fs_shell accordingly.
* Updated the DDM accordingly. The syscall interface remains unchanged,
  though.
* _user_supports_initializing_partition() also checks whether the parent
  partitioning system is content now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-22 21:21:30 +00:00
Ingo Weinhold
2a39e9e44e Made the remote_disk_server build under R5.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 14:54:09 +00:00
Ingo Weinhold
7e8ac2903b * Prefixed the variables NETWORK_LIBS, NETAPI_LIB, and
SELECT_UNAME_ETC_LIB with TARGET_ and introduced HAIKU_* and HOST_*
  counterparts.
* Use HOST_NETWORK_LIBS for building remote_disk_server.
* Also got rid of {R5,BONE,DANO,HAIKU}_COMPATIBLE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-12 22:15:10 +00:00
Ingo Weinhold
da0f9ae040 Added Haiku as host platform supported by the build system ("haiku_host").
Completely untested yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 21:13:56 +00:00
Ingo Weinhold
9e12e9a72e * Added mapping of dup() in the FS shell.
* Adjusted the FS initialize() hook to have FD and partition_id
  parameters like the other hooks instead of the partition path.
* Adjusted initialization in BFS accordingly.
* Implemented the FS initialization method in KFileSystem.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-02 12:43:49 +00:00
Ingo Weinhold
9b5ab44de9 Added switch "-a" to the FS shell's cp command. It turns on "attribute
only" mode, in which only the attributes from the source files are
copied to the (existing) target file.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-26 23:11:16 +00:00
Ingo Weinhold
21bf59c6cd Be stricter in case of errors in loops. We do always fully fail now, if
an error occurs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-26 22:54:32 +00:00
Axel Dörfler
965b10ccaa * Fixed build under BeOS/Dano (only tried the latter, though).
* Does anybody know why HaikuBuildCompatibility.h is not included for tools when
  compiled on BeOS/Dano?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-23 00:15:45 +00:00
Ingo Weinhold
6a2dfcbd88 Fixed debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-19 13:34:42 +00:00
Ingo Weinhold
1485d7a2d7 Added small tool source_to_data, which takes an arbitrary data file and
generates a C source file defining an array variable containing the file's
data. DataFileToSourceFile is the respective jam rule.

The idea is to directly built the boot archive into the boot loader for
network booting (and thus avoiding to download it from somewhere). In
case of PXE this doesn't work, though, due to restrictions to the size
of the NBP. Maybe Open Firmware is less restrictive.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 00:04:27 +00:00
Ingo Weinhold
679cd7d84b Temporary kludge to fix the build problem under BeOS regarding missing icons
for add-ons/libraries that don't have a signature. I threw our BAppFileInfo
code into libhaikucompat_build.a and link <build>mimeset and
<build>setversion against it, thus overriding the uncooperative BAppFileInfo
implementation in the host platform's libbe. Earlier or later we should use
libbe_build.so on BeOS compatible platforms as well, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-04 22:26:29 +00:00
Jérôme Duval
308771ff5d reverted to use __x86_64__ as it seems BeOSHostCompatibility header is not included for fs_shell
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21436 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 13:17:03 +00:00
Jérôme Duval
9cc679bb80 replaced uint32_t by fssh_addr_t. Obviously, the cookie should be managed differently.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 11:57:25 +00:00
Jérôme Duval
913f680ea2 followed Ingo's suggestion and introduced HAIKU_HOST_PLATFORM_64_BIT macro
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 11:51:49 +00:00
Jérôme Duval
a3ca7ebc40 x86_64 changes :
added atomic*64() functions
use int32 instead of long


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-17 10:50:18 +00:00
Ingo Weinhold
57ab8f6b30 Just go with the portable code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-15 18:23:28 +00:00
Ingo Weinhold
ee074918de Mostly aesthetical change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-15 18:13:39 +00:00
Travis Geiselbrecht
b9a5b9a6ee fix the build on darwin:
-fs_shell was using weak aliases, which is apparently not supported on the darwin toolchain 
	(or it's supported in some different way)
-remove building strl* routines for some of the host tools, since that already exists in libSystem


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-14 05:17:59 +00:00
Ingo Weinhold
cad7120f0c __attribute__(constructor) doesn't seem to work with gcc 2.95.3, so we
invoke driver_settings_init() manually now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-26 14:32:40 +00:00
Axel Dörfler
db8890ba1d * The mutex was obviously never initialized, and therefore mutex_unlock() panicked
here when trying to build Haiku.
* Also probably fixed a memory hole, at least how BFS is using delete_driver_settings();
  it might be a general problem of the implementation with regards to parse_driver_settings_string(),
  though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-25 14:38:59 +00:00
Axel Dörfler
e25a15c53b This fixes the build with GCC 2.95.3; hopefully it will work with GCC 4 as well as it looks like a compiler bug (at least I would guess typeof() is supposed to propagate the C linkage as well).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-25 08:24:25 +00:00
Ingo Weinhold
eedc15536c Added driver settings support to the FS shell.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-25 05:07:34 +00:00
Ingo Weinhold
362d99e715 Added fssh_read/write() implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-25 05:06:02 +00:00
Ingo Weinhold
53a79a4cde Patch by Morgan Howe: Support for building on Mac OS X. It should now be
possible to build a complete Haiku image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-19 15:01:11 +00:00
Ingo Weinhold
39bdbadf39 If the boot code couldn't be found in makebootable's resources, it tries
to load it from an attribute ("BootCode"). On Darwin we write the boot
code into this attribute. This should solve the problem that writing
resources into the makebootable file renders it not executable there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-18 17:33:21 +00:00
Ingo Weinhold
64ceaa002d Build addattr as a build tool as well. Needed for the new AddFileDataAttribute
rule.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-18 16:55:33 +00:00
Ingo Weinhold
6dcd0ccf23 Patch by Morgan Howe (slightly modified): Several changes to support
building on Mac OS X (Darwin). A problem with makebootable remains.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-18 15:59:04 +00:00
Ingo Weinhold
633a699447 Since I haven't got enough information to solve the missing LLONG_MAX
issue on some Linux distros by now, here's a work-around.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-07 13:43:55 +00:00
Ingo Weinhold
e23824d781 Surprising how much gcc 4 compilers on Linux differ. Another attempt to
make both gcc 2.95.3 and the plethora of gcc 4s happy: Typedefed
struct fssh_stat to fssh_struct_stat, thus hopefully avoiding spurious
errors concerning clashes with the function or regarding namespacing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-07 13:41:12 +00:00
Ingo Weinhold
5ddfffd44a Removed left over debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21039 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-06 13:48:07 +00:00
Ingo Weinhold
21da033912 Typo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21037 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-06 12:32:45 +00:00
Ingo Weinhold
047b4d3cc8 Patch by Samuel Rodriguez Perez (slightly modified): Make the new
bfs_shell build on FreeBSD. ioctl() is defined in a non-standard header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21032 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-05 13:16:00 +00:00
Ingo Weinhold
19d7a2a162 * Moved the syscalls into the FSShell namespace, so that they don't
collide with the functions defined in libroot_build.so.
* On BeOS incompatible platforms fssh_open() and fssh_close() use the
  libroot_build.so _kern_open() and _kern_close() respectively, so that the
  attribute support works also when using the generic attribute
  emulation.
* Use fssh_open()/fssh_close() instead of open()/close() for the cp
  command, so that we get attribute support on BeOS incompatible
  platforms when the generic attribute emulation is used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20980 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 16:59:10 +00:00
Ingo Weinhold
8dcb250c8a Thou shall not leave a blank line between copyright header and header
guard.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20976 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 14:26:29 +00:00
Ingo Weinhold
cc70cbe297 Reduced number of unused vnodes the VFS keeps around. We were hitting
the maximal number of (emulated) semphores on Linux before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 14:09:03 +00:00
Ingo Weinhold
84498b0ddc Incorrect vfs_put_vnode(). Missed that one when changing from
vfs_get_vnode() to vfs_lookup_vnode(). 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20971 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 13:45:17 +00:00
Ingo Weinhold
46a92976fd Missed this one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20970 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 13:13:36 +00:00
Ingo Weinhold
ca6586d9a3 Changed grist.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 13:10:52 +00:00
Ingo Weinhold
d0a2ff1303 Obsolete file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-02 13:07:54 +00:00
Ingo Weinhold
1fd66793e6 Link against libhaikucompat_build.a and the STL library.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 17:26:19 +00:00
Ingo Weinhold
a3615ef1e2 * Fixed build under BeOS.
* Added "sync" command.
* The input_loop() notifies the external command client also, if parsing
  the command line failed or the command didn't exist. It doesn't no longer
  try do so, when in interactive mode.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 17:24:26 +00:00
Ingo Weinhold
655195fec9 Don't use headers/build headers under BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 17:20:17 +00:00
Ingo Weinhold
c3c6ad0a0b BeOS build fixes:
* On BeOS compatible host platforms we must not include
  BeOSBuildCompatibility.h, but HaikuBuildCompatibility.h.
* Fixed errno usage in command_cp.cpp.
* Fixed fssh_ioctl().
* fssh_set_sem_owner() doesn't invoke BeOS's set_sem_owner() anymore or
  otherwise the FS's semaphores are assigned to the kernel.
* Commented out <string.h> functions that don't exist under BeOS (and aren't
  used anyway).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 17:19:19 +00:00
Ingo Weinhold
4b32170efd Work-around for an obscure gcc 2.95.3 bug: It complained about ambiguity
of fssh_stat struct and function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 17:09:47 +00:00
Ingo Weinhold
b245b1a838 Missing POSIX macro under BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 17:04:26 +00:00
Ingo Weinhold
6c19139d0e Fixed external command related code. Increased the command line length to
100 KB.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 17:02:13 +00:00
Ingo Weinhold
aeb215184f Also quote the quoted string characters.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20928 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-30 17:00:43 +00:00
Ingo Weinhold
dac7faad8d Added volume initialization support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-29 07:22:22 +00:00
Ingo Weinhold
f6233d2330 * Quieted down success output.
* Added non-interactive (external commands) support. The BeOS
  implementation needs some more work; well, the whole FS shell will
  probably have build issues on BeOS ATM.
* Added reasonably complete argument processing in main(). Options are
  similar to the old FS shell.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-28 23:47:03 +00:00