Whamcloud - gitweb
b=22244 ldlm cancel flags cleanup
[fs/lustre-release.git] / lustre / lvfs / prng.c
index 076883e..193fc8e 100644 (file)
@@ -16,8 +16,8 @@
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * version 2 along with this program; If not, see
+ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
  *
  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
  * CA 95054 USA or visit www.sun.com if you need additional information or
@@ -47,7 +47,7 @@
 
 #ifndef __KERNEL__
 #include <liblustre.h>
-#define get_random_bytes(val, size)     (*val) = 0
+#define cfs_get_random_bytes(val, size)     (*val) = 0
 #endif
 #include <obd_class.h>
 #if defined(HAVE_LINUX_RANDOM_H)
@@ -112,7 +112,7 @@ void ll_get_random_bytes(void *buf, int size)
 
         rem = min((int)((unsigned long)buf & (sizeof(int) - 1)), size);
         if (rem) {
-                get_random_bytes(&tmp, sizeof(tmp));
+                cfs_get_random_bytes(&tmp, sizeof(tmp));
                 tmp ^= ll_rand();
                 memcpy(buf, &tmp, rem);
                 p = buf + rem;
@@ -120,14 +120,14 @@ void ll_get_random_bytes(void *buf, int size)
         }
 
         while (size >= sizeof(int)) {
-                get_random_bytes(&tmp, sizeof(tmp));
+                cfs_get_random_bytes(&tmp, sizeof(tmp));
                 *p = ll_rand() ^ tmp;
                 size -= sizeof(int);
                 p++;
         }
         buf = p;
         if (size) {
-                get_random_bytes(&tmp, sizeof(tmp));
+                cfs_get_random_bytes(&tmp, sizeof(tmp));
                 tmp ^= ll_rand();
                 memcpy(buf, &tmp, size);
         }
@@ -139,4 +139,3 @@ void ll_generate_random_uuid(class_uuid_t uuid_out)
         ll_get_random_bytes(uuid_out, sizeof(class_uuid_t));
 }
 EXPORT_SYMBOL(ll_generate_random_uuid);
-