Print this page
NEX-16818 Add fksmbcl development tool
NEX-17264 SMB client test tp_smbutil_013 fails after NEX-14666
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Matt Barden <matt.barden@nexenta.com>
and: (fix ref leaks)
NEX-9808 SMB3 persistent handles
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-9808 SMB3 persistent handles
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
NEX-5599 SMB needs a pointer-based hash table for durable handles
Reviewed by: Gordon Ross <gwr@nexenta.com>
NEX-4083 Upstream changes from illumos 5917 and 5995
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Kevin Crowe <kevin.crowe@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
NEX-3620 need upstream cleanups for smbsrv
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
NEX-2460 libfksmbd should not link with libsmb
SMB-70 Hang during boot after SMB-50 (fix elfchk noise)
SMB-50 User-mode SMB server (oops)
SMB-50 User-mode SMB server
 Includes work by these authors:
 Thomas Keiser <thomas.keiser@nexenta.com>
 Albert Lee <trisk@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libfakekernel/common/kmisc.c
          +++ new/usr/src/lib/libfakekernel/common/kmisc.c
↓ open down ↓ 2 lines elided ↑ open up ↑
   3    3   * Common Development and Distribution License ("CDDL"), version 1.0.
   4    4   * You may only use this file in accordance with the terms of version
   5    5   * 1.0 of the CDDL.
   6    6   *
   7    7   * A full copy of the text of the CDDL should have accompanied this
   8    8   * source.  A copy of the CDDL is also available via the Internet at
   9    9   * http://www.illumos.org/license/CDDL.
  10   10   */
  11   11  
  12   12  /*
  13      - * Copyright 2014 Nexenta Systems, Inc.  All rights reserved.
       13 + * Copyright 2017 Nexenta Systems, Inc.  All rights reserved.
  14   14   * Copyright 2017 RackTop Systems.
  15   15   */
  16   16  
  17   17  #include <sys/types.h>
  18   18  #include <sys/time.h>
  19   19  #include <sys/thread.h>
  20   20  #include <sys/proc.h>
  21   21  #include <sys/zone.h>
  22      -
  23   22  #include <sys/poll.h>
  24   23  
       24 +#include <errno.h>
  25   25  #include <time.h>
  26   26  #include <stdlib.h>
  27   27  #include <unistd.h>
       28 +#include <string.h>
  28   29  #include <errno.h>
  29   30  
  30   31  #include <fakekernel.h>
  31   32  
  32   33  pri_t minclsyspri = 60;
       34 +extern zone_t zone0;
  33   35  
  34   36  /* Some kernel code takes the address of this. */
  35      -proc_t p0;
       37 +proc_t p0 = {
       38 +        .p_zone = &zone0, 0
       39 +};
  36   40  
  37   41  proc_t *
  38   42  _curproc(void)
  39   43  {
  40   44          return (&p0);
  41   45  }
  42   46  
  43   47  zone_t zone0 = {
  44   48          .zone_name = "global",
  45   49          .zone_zsched = &p0, 0
↓ open down ↓ 39 lines elided ↑ open up ↑
  85   89          }
  86   90          if (i & 0x2) {
  87   91                  h += 1;
  88   92          }
  89   93          return (h);
  90   94  }
  91   95  
  92   96  int
  93   97  ddi_strtoul(const char *str, char **endp, int base, unsigned long *res)
  94   98  {
       99 +        errno = 0;
  95  100          *res = strtoul(str, endp, base);
  96      -        if (*res == 0)
  97      -                return (errno);
  98      -        return (0);
      101 +        return (errno);
  99  102  }
 100  103  
 101  104  int
 102      -ddi_strtoull(const char *str, char **nptr, int base, u_longlong_t *res)
      105 +ddi_strtoull(const char *str, char **endp, int base, u_longlong_t *res)
 103  106  {
 104      -        char *end;
 105      -
 106      -        *res = strtoull(str, &end, base);
      107 +        errno = 0;
      108 +        *res = strtoull(str, endp, base);
 107  109          if (*res == 0)
 108  110                  return (errno);
 109  111          return (0);
 110  112  }
 111  113  
 112  114  void
 113  115  delay(clock_t ticks)
 114  116  {
 115  117          int msec = ticks;  /* NB: hz==1000 */
 116  118          (void) poll(0, 0, msec);
 117  119  }
 118  120  
 119  121  int
      122 +highbit(ulong_t i)
      123 +{
      124 +        return (fls(i));
      125 +}
      126 +
      127 +/* ARGSUSED */
      128 +int
 120  129  issig(int why)
 121  130  {
 122  131          return (0);
 123  132  }
 124  133  
 125  134  /*
 126  135   * This library does not really need an "init" function, but
 127  136   * providing one the main program can call is an easy way to
 128  137   * make sure this library is loaded into the debugger, and
 129  138   * gives us a way to avoid elfcheck complaints in the build.
 130  139   */
 131  140  void
 132  141  fakekernel_init(void)
 133  142  {
 134  143  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX