Commit Graph

8794 Commits

Author SHA1 Message Date
Axel Dörfler
e03f6fcfe2 Added the arch_config.h file for PPC, moved some stuff out of arch_cpu.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8913 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-11 11:04:23 +00:00
Rudolf Cornelissen
fc69f2f4f9 fixed fetching BIOS ROM on (some?) laptops.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-11 09:46:27 +00:00
Axel Dörfler
eab2037630 When a B_CONTIGUOUS area is created, its pages are now reserved upfront, as
this is the one thing most likely to fail - it now also handles this case
gracefully instead of dying.
Small cleanup, cleared some other ToDos: some user functions now delete
the area when they could not copy the target address.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-11 00:38:54 +00:00
Axel Dörfler
76faade4e7 Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 23:43:15 +00:00
Ingo Weinhold
2cfbe8a086 Added missing include.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 23:14:59 +00:00
Ingo Weinhold
91a4796939 No need to define the types here, since arch_config.h now uses C types.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 23:14:18 +00:00
Ingo Weinhold
d5ea40e2bd Use the build platform libstdc++.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 23:13:09 +00:00
Ingo Weinhold
b07e2ab15f uint32 -> unsigned int. No need to rely on defined types.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 23:12:23 +00:00
Axel Dörfler
d79751261c Added write support for the cache - it only writes internally right now,
it never writes back dirty pages. Code is not tested!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 19:49:46 +00:00
Axel Dörfler
be2703cb09 GCC 3 fixes. Doesn't work yet for some reason.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 18:29:52 +00:00
Axel Dörfler
53cf6d7a5c Added a BUILD_LIBSTDC++ variable for apps that have to run in the build
environment and have to link against libstc++.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 18:27:29 +00:00
Axel Dörfler
8ad7344829 gensyscalls.cpp should now build under Linux again.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 15:40:12 +00:00
Axel Dörfler
327981c3d8 Now includes arch_config.h instead of arch_cpu.h (because the info contained therein has moved).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 15:20:37 +00:00
Axel Dörfler
c2d416e259 Partially covered by arch_config.h and support/ByteOrder.h now/already.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 14:18:46 +00:00
Axel Dörfler
1aaaa3689a Moved some arch dependent config information to this new file (from arch_cpu.h).
There is probably more that could be moved in here.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-10 13:08:06 +00:00
Ingo Weinhold
61b83cc210 * Changed my doxygen comment markers from Qt to javadoc style, still
leaving the tags Qt style though. That's a bit weird, but that's the
  way Axel likes it, and we want to keep him happy, don't we? ;-P
* The common_[path_]read_stat() now fills in st_dev and st_ino in the
  result stat structure after the FS had its go. The information is
  readily available in the VFS, so why bother the FSs. In fact devfs
  didn't (and still doesn't) fill in st_dev which gave dev_for_path()
  some head ache.
* Modified _user_open_parent_dir() to accept a NULL buffer for the
  entry name and added a doxygen comment for it.

df now works properly on Haiku (save that printf() doesn't support
floating point numbers at the moment).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-09 23:21:09 +00:00
Ingo Weinhold
86170a3cd5 * Got rid of devfs_cookie::stream. It was superfluous since one can
always also access it through the devfs_vnode. This also solves an issue
  in devfs_read() where an access of a cookie->stream would crash the
  kernel, since cookie->stream was not set in devfs_open().
* devfs_open() now doesn't fail for directories and symlinks anymore.
  That prevented BNode to work for devfs dirs and symlinks.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-09 23:06:04 +00:00
DarkWyrm
b5eb4481e8 Some minor API cleanups
Documented quite a few functions while refamiliarizing myself with the desktop code


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-09 00:54:21 +00:00
Ingo Weinhold
1dae20235b If the /..' is /' then the name of the root node should consequently be
`.'. This fixes the _kern_open_parent_dir() syscall for the root directory.

I realized, that rootfs_read_dir() doesn't return the entries `.' and `..',
unlike Be's rootfs. Shall I add those, Axel?


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-08 21:31:18 +00:00
Axel Dörfler
1c448f3551 Removed all inline functions.
Also no longer let getc()/putc() point to libio functions directly (they
were even only macros there, too...).
Should now be backwards compatible, too. Thanks to Waldemar for pointing this out!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-08 16:22:28 +00:00
Waldemar Kornewald
496d0bc32f Moved uio struct to core_private.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-08 08:45:32 +00:00
Waldemar Kornewald
5fdb117cae We are Haiku.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-08 08:45:24 +00:00
ejakowatz
5958205f6c Fixed bug. There was an issue with unflattening. When moving dataPtr along the buffer to the next variable-size item, the padding was being incorrectly calculated (too large) because the four-byte size header was not being taken into account. E.g., for an 18-byte item, the padding was calculated as 6 bytes, rather than two, placing dataPtr directly past the size header for the next item. An incorrect value would be used as the size for the next item, which could result in anything from a segment violation to an allocation failure.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 23:33:31 +00:00
ejakowatz
974d454507 Fixed bug. BMessageBody's assignment operator was making a generic copy of the map which maintains the data -- meaning only pointers to contained BMessageFields were being copied. Added Clone() operation to BMessageField and Copy() to BMessageFieldStoragePolicy, along with a specialization of BMessageFieldStoragePolicy for BDataBuffer; a straight copy of the vector is sufficient for all other data types. This fixes issues with BMessage unittests where BMessage, entry_ref, BFlattenable, and raw data are exercises.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 23:25:09 +00:00
ejakowatz
02043d35db Added calc_padding() convenience function for calculating how much padding to add to a buffer in order for it to fall on a specified byte boundary.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 23:06:32 +00:00
ejakowatz
e4265bfbfe Modified BDataBuffer's copy constructor to let the user specify whether to create a copy of the buffer or just a reference. Also changed all void* params to be const.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 23:00:30 +00:00
ejakowatz
9fa0302ad0 Added two tests for flattening and unflattening.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 22:54:06 +00:00
ejakowatz
0cea36dca4 Jamfile addition so that BMessage B_NO_REPLY-on-destruction tests will actually get used.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 22:24:21 +00:00
ejakowatz
221abfb27f BMessage now sends a B_NO_REPLY on destruction if no other reply has been sent; these are the tests for that behavior.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 21:59:28 +00:00
Axel Dörfler
bd80f1c775 Now handles NULL cookies for the VM fs calls gracefully (in case someone
would want to mmap() a device directly).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 15:39:03 +00:00
Axel Dörfler
df435e99c2 Now only prints out the path if the path was initialized successfully - else
the app would crash in this case (because BPath::Path() could return NULL
then).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 01:50:08 +00:00
Axel Dörfler
0f3697566d The fs_readlink() function must work a bit differently in the new VFS API
(ie. it needs to add the terminating null byte).
It now also properly fails if the link is too long for the provided buffer.
This allows us to resolve links on BFS volumes using Haiku again :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 01:47:08 +00:00
Jérôme Duval
7072c960f8 adding comments
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 00:33:55 +00:00
Jérôme Duval
da4ca8a49e added keymap
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 00:20:34 +00:00
Jérôme Duval
43ca889200 fixed logging, a bit of worker
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8879 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-07 00:03:20 +00:00
Jérôme Duval
e73537f459 rebased on the mouse device addon, cleaned, untested
still lacks better logging, thread worker, settings handling, keymap management and that's all!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 23:34:06 +00:00
Axel Dörfler
a4e05e618a Added a "cookie" parameter to the fs_read|write|has_page[s]().
Implemented bfs_get_file_map().
Now uses the brand new file cache for the file data streams.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 22:56:52 +00:00
Axel Dörfler
dc3089f8ff Added a "cookie" parameter to the fs_read|write|has_page[s]().
This has the advantage that the device can now be access in the right context.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 22:48:58 +00:00
Axel Dörfler
dd6cb90eac Added a "cookie" parameter to the fs_read|write|has_page[s]().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 22:34:08 +00:00
Axel Dörfler
68085f7cec Added a "cookie" parameter to the fs_read|write|has_page[s]().
Fixed the calculation of the amount of bytes read in bootfs_read_pages().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 22:32:00 +00:00
Axel Dörfler
2829b349c6 Added a "cookie" parameter to the vfs_read|write|has_page[s]().
Added an vfs_get_cookie_from_fd() call to at least temporarily support the
cookie as in the original devfs (not sure yet how this changes).
Implemented vfs_get_file_map() which calls the corresponding FS function.
Moved vfs_get_vnode_cache() around.
vfs_get_vnode() temporarily does its job unlocked - its only to be used (safely)
from within the file cache, but this should definitely be done better.
Fixed a bug in get_vnode_name() - it did not support getting the name of
a root directory; it didn't pass the call through to the parent file system.
Fixed a bug in _user_entry_ref_to_path() which would add another "/" for
files immediately under the root (ie. "df" showed "//boot" as mount point
for the boot partition).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 22:29:20 +00:00
Axel Dörfler
55efd37df7 Added the file_cache.cpp file to the build.
_KERNEL_MODE is already defined when using kernel build rules, no need
to do it here manually.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 22:05:46 +00:00
Axel Dörfler
e02c12f0b3 Added a "cookie" parameter to the vfs_read|write|has_page[s]().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 22:03:47 +00:00
Axel Dörfler
aabc1217bb Fixed warnings, small cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 22:01:48 +00:00
Axel Dörfler
ba84415a02 Added a "cookie" parameter to the fs_read|write|has_page[s]().
Changed the fs_get_file_map() call a bit - the requested file offset and size
were missing.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 21:54:57 +00:00
Axel Dörfler
7f0c6086a4 The last parameter of file_cache_create() is a file descriptor, not an open mode.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 21:53:36 +00:00
Axel Dörfler
cfd8ea7832 Added a "cookie" parameter to the vfs_read|write|has_page[s]().
Also added a prototype for the fs_get_file_map() fs call.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 21:52:28 +00:00
Axel Dörfler
9f67399eea Made header C++ safe. Also replaced the old "addr" type with "addr_t".
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 21:49:38 +00:00
assimil8or
1d24af2571 my first commit: makes it possible to load R5 terminal setting files via the command line (Option -p)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 20:15:13 +00:00
Axel Dörfler
cbe8d2b0fe Applied some parts of our style guide.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 17:33:33 +00:00