* Patch by Yuli Barcohen, 4 Mar 2004:

Fix problems with GCC 3.3.x which changed handling of global
  variables explicitly initialized to zero (now in .bss instead of
  .data as before).

* Patch by Leon Kukovec, 02 Mar 2004:
  add strswab() to fix IDE LBA capacity, firmware and model numbers
  on little endian machines

* Patch by Masami Komiya, 02 Mar 2004:
  - Remove get_ticks() from NFS code
  - Add verification of RPC transaction ID

* Patch by Pierre Aubert, 02 Mar 2004:
  cleanup for IDE and USB drivers for MPC5200
This commit is contained in:
wdenk 2004-03-14 00:59:59 +00:00
parent 0e6d798cb3
commit c3f9d4939a
11 changed files with 231 additions and 77 deletions

View file

@ -364,6 +364,33 @@ char * strsep(char **s, const char *ct)
}
#endif
#ifndef __HAVE_ARCH_STRSWAB
/**
* strswab - swap adjacent even and odd bytes in %NUL-terminated string
* s: address of the string
*
* returns the address of the swapped string or NULL on error. If
* string length is odd, last byte is untouched.
*/
char *strswab(const char *s)
{
char *p;
if ((NULL == s) || ('\0' == *s)) {
return (NULL);
}
for (p = ((char *)s + 1); '\0' != *p; p += 2) {
char tmp;
tmp = *(p-1);
*(p-1) = *p;
*p = tmp;
}
return (char *) s;
}
#endif
#ifndef __HAVE_ARCH_MEMSET
/**
* memset - Fill a region of memory with the given value