Index: src/trusted/validator/nacl_file_info.h |
diff --git a/src/trusted/validator/nacl_file_info.h b/src/trusted/validator/nacl_file_info.h |
index f93796bac2cbf553071a40899ac1d563310303f7..3f1068f28e0ff8715a85c5c04d4f60806e3954aa 100644 |
--- a/src/trusted/validator/nacl_file_info.h |
+++ b/src/trusted/validator/nacl_file_info.h |
@@ -4,12 +4,19 @@ |
* 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_TRUSTED_VALIDATOR_NACL_FILE_INFO_H_ |
+#define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_NACL_FILE_INFO_H_ |
#include "native_client/src/include/nacl_base.h" |
#include "native_client/src/include/portability.h" |
+/* |
+ * TODO(jvoung): Moving this to src/public/nacl_file_info.h. |
+ * This copy is left here to avoid a complicated NaCl -> Chrome |
Mark Seaborn
2014/05/02 20:50:40
You shouldn't leave this as a duplicate. Instead,
jvoung (off chromium)
2014/05/14 23:42:47
Done.
|
+ * DEPS roll. Remove this copy once DEPS'ed in a Chrome users |
+ * refer to the src/public copy instead of this copy. |
+ */ |
+ |
EXTERN_C_BEGIN |
/* |
@@ -22,6 +29,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 +41,4 @@ struct NaClFileInfo { |
EXTERN_C_END |
-#endif /* NATIVE_CLIENT_SRC_TRUSTED_REVERSE_SERVICE_NACL_FILE_INFO_H_ */ |
+#endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_NACL_FILE_INFO_H_ */ |