Commit Graph

21097 Commits

Author SHA1 Message Date
Stephan Aßmus
13310304ea * fixed Mail startup, it would not open a window because of an uninitialized
variable (#1459)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-08 15:15:32 +00:00
Stephan Aßmus
53d9356e96 * applied another large patch to cleanup and refactor code by Julun (aka HOST)
* Julun also fixed some font sensitivity issues
* Julun already replaced the bitmap clock with resizable clock rendering,
  I took this as a base and tried to make it visually pleasing



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22199 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-07 10:23:12 +00:00
Ingo Weinhold
6b6f6b7240 Partitions do now know whether they have already been published and
avoid attempts to publish a second time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-07 00:05:06 +00:00
Ingo Weinhold
c22ee2bf75 When avoiding to rescan a partition, we still have to recurse so that
its unidentified children can be scanned, if necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 23:47:07 +00:00
Stephan Aßmus
c4650bba52 * CopyEngine::Start() didn't return something at the end of the function
* CopyEngine::CopyFolder() forgot to GetName(name) before using "name" in
  strcmp()
* "delete" already checks for NULL


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 23:02:41 +00:00
Ingo Weinhold
8a10c0b5a7 Changes in BPlusTree::_SplitNode():
* Added check for invalid keyIndex parameter.
* Removed superfluous break condition in the second loop.
* Increment "out" in the second loop only when we have processed a key
  that will end up in the node. Thus, after the loop, the variable will
  contain the numbers of keys to be copied/moved, not that number + 1.
  Adjusted later use of "out" accordingly, save in one place where it
  was used incorrectly, which resulted in one key length and value to
  many to be copied, thus occasionally causing a page fault (bug #1363).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 21:04:13 +00:00
Jérôme Duval
759833c921 patch from JiSheng: fixed usage for option -M, added examples for testing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 18:12:33 +00:00
Michael Pfeiffer
5f380e3415 Fixed typo
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 16:17:08 +00:00
Michael Pfeiffer
4f422578c0 * More error checking.
* Added more bitmap test cases. Reveals a interface kit bug: the
  1024x768 bitmap is not drawn at all!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 16:00:20 +00:00
Michael Pfeiffer
df96d14d39 Workaround for drawing issue in Haiku. It seems the initial drawing state when drawing a list item is different from BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 15:50:31 +00:00
Stephan Aßmus
1de41c158d * fixed tracker single click selection.
If I may say so, I find this code extremely messy and in desperate need for
refactoring. The bad news is that selection flickers now - the columns which
don't need to be drawn at all. I printed some debugging info in
BTextWidget::Draw() and it appears that for a single selection state change,
at least four invokations of BTextWidget::Draw() will result. Sometimes many
more. Since the code calculated the dirty rects wrongly in many places, it
appears that this bug might not have shown before. Like I said, the code is
a mess and there is not a single place for invalidating poses, so I am not
surprised why tons of invalidations arrive. :-/ Maybe I should make myself
more familiar with Tracker... or revert my text outline patch. :-P


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 10:40:47 +00:00
Stephan Aßmus
54a7f0923c * fExtraFlags was not maintained in various places, most importantly nowhere
in SetFamilyAndStyle(), this should fix stuff like IsFixed() not working


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 09:31:57 +00:00
Ingo Weinhold
eb4ea3062e Bash applies the same logic on SIGHUP as on normal exit now. Jobs are
sent a SIGHUP only when that was explicitely requested via shopt
huponexit. Thus it behaves like other shells (ksh, tcsh, ash,...).
Background processes are no longer terminated when closing the terminal.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 02:20:13 +00:00
Ingo Weinhold
923efaa872 * We store the ID of the controlling terminal and the foreground process
group ID with the session and let the terminal update them.
* Added an "orphaned" flag to the process_group structure and code to
  maintain it.
* Handle the death of a controlling process correctly: The
  foreground process group gets a SIGHUP and all newly-orphaned process
  groups containing at least one stopped processes are sent
  SIGHUP+SIGCONT.
* The tty handles the O_NOCTTY flag correctly, now.
* The tty handles reads/writes from processes from other sessions
  correctly, now.
* Handle tcsetpgrp() from background processes correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 02:16:25 +00:00
Ingo Weinhold
df716df51d * Added is_signal_blocked() convenience function.
* Defined flag SIGNAL_FLAG_TEAMS_LOCKED for send_signal_etc(), so it can
  be called with the team lock being held.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 02:03:43 +00:00
Ingo Weinhold
35e78b5674 * Some cleanup in _user_setpgid() (use of autolocking, don't use
shadowing variables).
* Resolved TODO: We wake up the parent if waiting in wait_for_child()
  now, if the process group changes.
* Added another TODO: setpgid() is supposed to fail on a child after
  it has executed exec*().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 19:36:38 +00:00
Ingo Weinhold
96b421b83d Added support for "optional packages". Those can be defined in
HaikuImage and enabled individually using the
AddOptionalHaikuImagePackages rule or all at once by setting
HAIKU_ADD_ALL_OPTIONAL_PACKAGES. In principle an optional package can
be any kind of addition to the Haiku image, but usually a zip file will
be downloaded from somewhere and unzipped onto the image. I've added a
WonderBrush package as an example.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 18:36:17 +00:00
Ingo Weinhold
540d4f7b6e * Simplified the recently introduced handling for symlinks a bit.
* Unfortunately it's not allowed to set user xattrs on symlinks. So, if
  we've failed in fs_write_attr() to set an extended attribute, we check
  whether the node is a symlink and the attribute just a "BEOS:TYPE",
  and pretend to have succeeded in this case. Thus we avoid annoying
  error messages e.g. in unzip.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 18:23:21 +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
16df02e515 New DownloadFile rule, downloading a file using wget.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22181 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-05 03:08:38 +00:00
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