148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * CDDL HEADER START
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * The contents of this file are subject to the terms of the
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * Common Development and Distribution License (the "License").
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * You may not use this file except in compliance with the License.
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * See the License for the specific language governing permissions
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * and limitations under the License.
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * When distributing Covered Code, include this CDDL HEADER in each
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * If applicable, add the following below this CDDL HEADER, with the
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * fields enclosed by brackets "[]" replaced with your own identifying
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * information: Portions Copyright [yyyy] [name of copyright owner]
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * CDDL HEADER END
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * This file provides a text translation service for NT status codes.
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * Include the generated file with ntx_table[]
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * See smb_status_gen.awk
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wrightstatic const int ntx_rows = sizeof (ntx_table) / sizeof (ntx_table[0]);
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * Comparison function for bsearch(3C).
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wrightxlate_compare(const void *vkey, const void *vrow)
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright return (-1);
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * Translate an ntstatus value to a meaningful text string. If there isn't
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * a corresponding text string in the table, the text representation of the
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * status value is returned. This uses a static buffer so there is a
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * possible concurrency issue if the caller hangs on to this pointer for a
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * while but it should be harmless and really remote since the value will
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright * almost always be found in the table.
148c5f43199ca0b43fc8e3b643aab11cd66ea327Alan Wright return ((const char *)unknown);