Commit Graph

9135 Commits

Author SHA1 Message Date
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
Axel Dörfler
4bccccda2e Fixed two wrong cast types which broke the build over here.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 17:28:42 +00:00
Philippe Houdoin
a68b2eb2ce Fix the keyboard focus order by changing how and in which order things are
created.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 14:43:42 +00:00
Philippe Houdoin
606359d937 Commit often, commit small...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 09:51:12 +00:00
Stefano Ceccherini
33efb91915 Almost rewrote the mouse input add-on to handle multiple devices, added usb devices monitoring (not tested as USB doesn't work on my machine).
Now it generates the device name from the folder name (i.e. /dev/input/mouse/serial/0 ---> "serial mouse 1").


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 06:42:58 +00:00
Axel Dörfler
f72376a8dd The beginnings of a file cache. Read-only is already working fine; very
basic and with a temporary API.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-06 01:23:57 +00:00
Axel Dörfler
7f2ba8be02 Now clears out any remainders of the pages in the iovecs if the request
couldn't be satisfied completely (ie. because the file size is not a
multiple of the page size).
It's no longer necessary to implement this functionality in the file systems.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-05 14:57:54 +00:00
Waldemar Kornewald
15288c9013 Fixed the build of our netstack.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-05 10:59:00 +00:00
DarkWyrm
fcde063209 Misplaced this file when I was checking stuff in a bit ago
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-05 00:59:28 +00:00
DarkWyrm
8a715d82f6 turned off debug output in AppServer.cpp and ServerApp.cpp
system palette is now hardcoded using Ingo's BBitmap code for a speedup and the ability to reference the server's system palette without the server actually running
Added some utility classes to make finishing DisplayDriver easier and cleaner
Removed a stray debugger call in DisplayDriver
Added a display mode conversion function to Utils.cpp
Began conversion of BitmapDriver to utilize PixelRenderer class where appropriate


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-09-05 00:52:45 +00:00