Commit Graph

21077 Commits

Author SHA1 Message Date
Ingo Weinhold 97d5bb2bf3 Disabled the attribute name checks for "name", "size", and
"last_modified" for the time being. BeOS allows creating and reading
attributes with those names.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22180 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 03:07:40 +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 4291baf0db Added support for fs_fopen_attr_dir() on symlinks (if they were opened
with _kern_open()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22177 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 02:59:27 +00:00
Ingo Weinhold 598d021972 * Fixed bug in the code normalizing entry paths, causing e.g. broken
symlinks to be not openable.
* When _kern_open() created a new file, invalid stat data were accessed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22176 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 02:58:01 +00:00
Ingo Weinhold 4c8f3064a2 <fcntl.h> needs to be included for O_NOFOLLOW.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 02:54:24 +00:00
Ryan Leavengood b40c990627 Additional style fixes from Julun: adding back the virtual keyword, moving the
commas on class member initializers, fixing a typo. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 02:47:33 +00:00
Ingo Weinhold 0d469404ed Added support for unzipping archives onto the Haiku image. The new rule
to do that is UnzipArchiveToHaikuImage. Cf. UserBuildConfig.sample for
a usage example.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 21:50:00 +00:00
Axel Dörfler 5e1d6fb269 * Added _ALIGN() and _ALIGNBYTES macros.
* Added cmsg macros.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 21:36:59 +00:00
Axel Dörfler ef27f7d0e0 Ported over atftpd from Linux - should work on BSD as well, now.
Not yet tested, and it will probably not work correctly until we support
IP_RECVDSTADDR correctly (we don't support that CMSG stuff yet).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 21:35:58 +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 b4c9e509be Added macro to enabled the -J option even if not compiling under BeOS or
MacOS.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 18:59:05 +00:00
Ingo Weinhold 6aae5da480 It suffices to open a node read-only to write its attributes. In fact
open() is supposed to fail for directories when write access is
requested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22168 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 18:57:13 +00:00
Ingo Weinhold 011e7a3d71 * We mangle the attribute names now, since '/' in attribute names seemed
to be problematic.
* Changed our xattr attribute namespace to "user.haiku." to prevent
  xattrs from other programs (e.g. Beagle) to end up on the image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 18:49:08 +00:00
Ingo Weinhold bf96bbafd8 Include <sys/uio.h> to fix gcc 4 warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 18:42:13 +00:00
Stefano Ceccherini ecef598e73 Added a window creation speed test. Can test empty windows or windows
with BBoxes within.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 14:10:40 +00:00
Axel Dörfler 079c69cbfd Added daemon() function to libbsd.so.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 12:32:20 +00:00
Ryan Leavengood f303cd6cc2 Applied patch from "HOST", with a few small style fixes myself.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22163 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 03:08:40 +00:00
François Revol af73a9fb93 Add reading of .url files from win, redirects to default browser.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-04 01:26:42 +00:00
Ingo Weinhold 33f0dbe40a * Resolved TODO: waitpid() clears pending SIGCHLD, if the signal is
blocked and no other child status is available.
* Respect SA_NOCLDWAIT and ignored SIGCHLD in waitpid(): Unless a child
  status is available immediately, the thread shall block until all
  children are gone.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 21:35:24 +00:00
Jérôme Duval c4ec032d19 ooops it was le32toh
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 20:59:02 +00:00
Ingo Weinhold eadeecc2ff Updated TODO.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 20:35:27 +00:00
Jérôme Duval 9b17641496 missing le32toh()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 19:52:44 +00:00
Jérôme Duval a44ef21361 added fwcontrol, fw_raw and firewire. This could break someone's build :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 18:44:57 +00:00
Axel Dörfler 87689e25ea * sMappingLock is now a mutex instead of a spinlock.
* The vm_translation_map is now correctly held in all of the vm_ mapping
  functions.
* Removed the old vm_daemons.c file - there is now a new vm_daemons.cpp
  which contains the beginnings of our new page daemon.
  So far, it's pretty static and not much tested. What it currently does
  is to rescan all pages in the system with a two-handed clock algorithm
  and push pages into the modified and inactive lists.
* These inactive pages aren't really stolen yet, even though their mappings
  are removed (ie. their next access will cause a page fault). This should
  slow down Haiku a bit more, great, huh? :-)
* The page daemon currently only runs on low memory situations, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 15:41:14 +00:00
Axel Dörfler d8badf6791 * Renamed page queues according to our style guide.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22155 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 15:35:09 +00:00
Axel Dörfler b50494aaac * file_cache_set_size() now calls file_cache_invalidate_file_map() with the
correct values (resolving a TODO); however, the latter doesn't do anything
  with those yet.
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 12:42:53 +00:00
Ingo Weinhold bc5f008afb Added "breakpoint", "watchpoint", "breakpoints", and "watchpoints"
kernel debugger commands, which can set/clear/list in-kernel break- and
watchpoints. Only available when KERNEL_BREAKPOINTS is defined. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22153 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-03 00:32:30 +00:00
Ingo Weinhold d2056c9933 * Added "caches" debugger command (to be enable by defining
DEBUG_CACHE_LIST) that prints an unspectacular list of pointers to all
  existing caches. Feel free to extend.
* Enhanced MultiAddressSpaceLocker:
  - It supports choosing between read and write lock per address space,
    now.
  - Added AddAreaCacheAndLock(), which adds the address spaces of all
    areas that are attached to a given area's cache, locks them, and
    locks the cache. It makes sure that the area list didn't change in
    the meantime and optionally also that all areas have their
    no_cache_change flags cleared.
* Changed vm_copy_on_write_area() to take a cache instead of an area,
  requiring it to be locked and all address spaces of affected areas to
  be read-locked, plus all areas' no_cache_change flags to be cleared.
  Callers simply use MultiAddressSpaceLocker:: AddAreaCacheAndLock() to
  do that. This resolves an open TODO, that the areas' base, size, and
  protection fields were accessed without their address spaces being
  locked.
* vm_copy_area() does now always insert a cache for the target area. Not
  doing that would cause source and target area being attached to
  the same cache in case the target protection was read-only. This
  would make them behave like cloned areas, which would lead to trouble
  when one of the areas would be changed to writable later.
* Fixed the !writable -> writable case in vm_set_area_protection(). It
  would simply change the protection of all mapped pages for this area,
  including ones from lower caches, thus causing later writes to the
  area to be seen by areas that shouldn't see them. This fixes a problem
  with software breakpoints in gdb. They could cause other programs to
  be dropped into the debugger.
* resize_area() uses MultiAddressSpaceLocker::AddAreaCacheAndLock() now,
  too, and could be compacted quite a bit.
 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 22:55:23 +00:00
Ingo Weinhold addece2001 * Fixed incorrect check in condition_variable_interrupt_thread().
Condition variables would never be interrupted.
* ConditionVariableEntry::Add() did not correctly insert the entry into
  the per-thread list of entries (the next link of the previous entry
  was not adjusted), which could leave the entry unnotified when the
  previous entry was notified, thus leaving it in the respective
  condition variable's list after the end of its life time. This should
  fix a crashing bug I rarely encountered.
* Added debug checks in the PrivateConditionVariableEntry
  constructor/destructor that should have helped me to find
  forementioned bug hours earlier, had I been bright enough to realize
  that I didn't include <debug.h> and those KDEBUG guarded checks were
  never executed. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 22:21:26 +00:00
Ingo Weinhold 667f1eeb67 * Added support for setting (hardware) break-/watchpoints in the kernel.
Can be enabled by defining KERNEL_BREAKPOINTS in arch/user_debugger.h
  and will provide the arch_{set,clear}_kernel_{break,watch}point()
  function. Hitting a break-/watchpoint will throw the thread into KDL.
* Finally added a comment, what's the point of
  i386_reinit_user_debug_after_context_switch(), since I wonder every
  time I see it. Should be optimized aways soon.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 22:04:36 +00:00
Axel Dörfler 8a3cfa2cf3 * Made menu windows behave differently than others: before, they were just
always put between window screens and modal all windows (before floating
  all ones), so a BWindowScreen couldn't have menus at all.
  Now, they behave more like floating app windows, just that they float above
  all other application windows, such that all window feels (also BWindowScreen)
  can now have menus.
* Reenabled keyboard redirection to the top most window in case it's a menu;
  bug #1152 no longer applies due to the above change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22149 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 12:16:28 +00:00
Axel Dörfler 4c751e51c8 Added a test application to investigate how BeOS deals with keyboard input
in menus - the application will crash as soon as you open the "Crash" sub
menu.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-02 12:02:57 +00:00
Marcus Overhagen 23c7bf9da2 enable interrupts
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 20:49:07 +00:00
Marcus Overhagen 25f926d8e4 forward scsi request to the ports
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 20:26:07 +00:00
Marcus Overhagen 4f733fe93b added Interrupt handling framework
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22145 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 19:54:45 +00:00
Marcus Overhagen 3d41648479 implemented controller reset and AHCI enable, init a port object for each implemented device port
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22144 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 18:51:57 +00:00
Marcus Overhagen 9815383e54 a class for the SATA ports
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22143 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 18:51:03 +00:00
Ingo Weinhold fed5bce4e3 Made SetTo() deal with the lockable == NULL, alreadyLocked == true
correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22142 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 18:00:22 +00:00
Marcus Overhagen 105f622310 print proper values for zero-based numbers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 16:52:46 +00:00
Ingo Weinhold e5c9c9e371 Also print the expected value. Some comment on what should happen.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22140 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 15:16:45 +00:00
Stefano Ceccherini b33a19a278 Adjusted a bit BTextView::AutoResize() so that the text rect is more
centered. At least renaming a file in tracker looks a bit better now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22139 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 14:51:51 +00:00
Ingo Weinhold 538abf58b3 Added test case for the r/o text segment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 14:42:59 +00:00
Marcus Overhagen 093a713df2 map registers and print some information
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 14:29:10 +00:00
Marcus Overhagen 1a941c2e04 added more definitions from specification
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 14:28:47 +00:00
Stephan Aßmus 2c5a88945e fix more glitches:
* invalidate the correct rect on WindowActivated() in case fDivider is not
  correclty maintained
* don't cut off part of the label in Draw() by constraining the clipping in
  case the placement of the label is a little different than intented


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 13:33:51 +00:00
Stephan Aßmus a431f44be8 * make the text view layouting more robust, draw the frame around the
text view, ignore the divider for this (application code could layout
  the textview itself, and fDivider might not be maintained)
* change Draw() and TextInput::MakeFocus() accordingly

this fixes the weird placement of text controls in Beam


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 12:51:59 +00:00
Marcus Overhagen 06c88385e8 copied
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 12:40:39 +00:00
Ingo Weinhold 1d1b0d065b Made ProcessController's "Debug Thread" feature work under Haiku. We
don't have a "db" command (we could probably add a small shell script
that invokes gdb in a Terminal), but just as BeOS we have
debug_thread(), which does exactly that -- throwing a thread into the
debugger. It (at least Haiku's version, not sure about BeOS's) also
interrupts system calls, which makes the semaphore releasing hack
superfluous.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-01 00:31:19 +00:00
Jérôme Duval 0735851ca7 readme for firewire from JiSheng
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-31 18:21:34 +00:00