| Index: src/public/nacl_file_info.h
|
| diff --git a/src/trusted/validator/nacl_file_info.h b/src/public/nacl_file_info.h
|
| similarity index 72%
|
| copy from src/trusted/validator/nacl_file_info.h
|
| copy to src/public/nacl_file_info.h
|
| index f93796bac2cbf553071a40899ac1d563310303f7..0c103bdfa1849ca5143e08d1e18d2e6949a3cbec 100644
|
| --- a/src/trusted/validator/nacl_file_info.h
|
| +++ b/src/public/nacl_file_info.h
|
| @@ -4,8 +4,8 @@
|
| * found in the LICENSE file.
|
| */
|
|
|
| -#ifndef NATIVE_CLIENT_SRC_TRUSTED_REVERSE_SERVICE_NACL_FILE_INFO_H_
|
| -#define NATIVE_CLIENT_SRC_TRUSTED_REVERSE_SERVICE_NACL_FILE_INFO_H_
|
| +#ifndef NATIVE_CLIENT_SRC_PUBLIC_NACL_FILE_INFO_H_
|
| +#define NATIVE_CLIENT_SRC_PUBLIC_NACL_FILE_INFO_H_
|
|
|
| #include "native_client/src/include/nacl_base.h"
|
| #include "native_client/src/include/portability.h"
|
| @@ -22,6 +22,10 @@ struct NaClFileToken {
|
| uint64_t hi;
|
| };
|
|
|
| +static INLINE int NaClFileTokenIsValid(struct NaClFileToken *file_token) {
|
| + return !(file_token->lo == 0 && file_token->hi == 0);
|
| +}
|
| +
|
| struct NaClFileInfo {
|
| /* desc is either a Unix file descriptor or a Windows file handle. */
|
| int32_t desc;
|
| @@ -30,4 +34,4 @@ struct NaClFileInfo {
|
|
|
| EXTERN_C_END
|
|
|
| -#endif /* NATIVE_CLIENT_SRC_TRUSTED_REVERSE_SERVICE_NACL_FILE_INFO_H_ */
|
| +#endif /* NATIVE_CLIENT_SRC_PUBLIC_NACL_FILE_INFO_H_ */
|
|
|